forked from apache/spark
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SPARK-42815][SQL] Subexpression elimination support shortcut expression
### What changes were proposed in this pull request? Add a new config to shortcut subexpression elimination for expression `and`, `or`. The subexpression may not need to eval even if it appears more than once. e.g., `if(or(a, and(b, b)))`, the expression `b` would be skipped if `a` is true. ### Why are the changes needed? avoid eval unnecessary expression. ### Does this PR introduce _any_ user-facing change? no ### How was this patch tested? add test Closes apache#40446 from ulysses-you/shortcut. Authored-by: ulysses-you <[email protected]> Signed-off-by: Wenchen Fan <[email protected]>
- Loading branch information
1 parent
d679dab
commit 6f7403b
Showing
3 changed files
with
63 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters