[FEA] Support if/else in AST
- Dominant language
- C++
- Stars
- 9.8k
- Forks
- 1.1k
- Avg merge
- 3d 6m
- Merged PRs (30d)
- 278
Description
**Is your feature request related to a problem? Please describe.**
As a part of https://github.com/rapidsai/cudf/issues/11162 we really could use the ability to do if/else statements in AST.
**Describe the solution you'd like**
Just like I said. It would be great to have a way to do if/else statements in AST. Takes a boolean value, a true expression and a false expression as input. If the boolean predicate is true then the true expression is evaluated and returned. If boolean predicate is false, then the false expression is evaluated and returned. For performance/consistency reasons I am fine if we evaluate both paths and just pick the one needed at the end.
**Describe alternatives you've considered**
We really have no good way to simulate this with existing operators, except in some very rare corner cases.
Contributor guide
Assessment
This issue has not been assessed yet.