-
Notifications
You must be signed in to change notification settings - Fork 235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix correctness issue with CASE WHEN with expressions that have side-effects #4383
Merged
andygrove
merged 22 commits into
NVIDIA:branch-22.02
from
andygrove:gpu-case-when-side-effect
Jan 6, 2022
Merged
Fix correctness issue with CASE WHEN with expressions that have side-effects #4383
andygrove
merged 22 commits into
NVIDIA:branch-22.02
from
andygrove:gpu-case-when-side-effect
Jan 6, 2022
Conversation
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
…effects Signed-off-by: Andy Grove <andygrove@nvidia.com>
build |
jlowe
reviewed
Dec 20, 2021
sql-plugin/src/main/scala/com/nvidia/spark/rapids/conditionalExpressions.scala
Outdated
Show resolved
Hide resolved
Signed-off-by: Andy Grove <andygrove@nvidia.com>
…cumulativePred is true Signed-off-by: Andy Grove <andygrove@nvidia.com>
andygrove
changed the title
WIP: Fix correctness issue with CASE WHEN with expressions that have side-effects
Fix correctness issue with CASE WHEN with expressions that have side-effects
Dec 21, 2021
jlowe
reviewed
Dec 22, 2021
sql-plugin/src/main/scala/com/nvidia/spark/rapids/conditionalExpressions.scala
Outdated
Show resolved
Hide resolved
sql-plugin/src/main/scala/com/nvidia/spark/rapids/conditionalExpressions.scala
Outdated
Show resolved
Hide resolved
sql-plugin/src/main/scala/com/nvidia/spark/rapids/conditionalExpressions.scala
Outdated
Show resolved
Hide resolved
sql-plugin/src/main/scala/com/nvidia/spark/rapids/conditionalExpressions.scala
Outdated
Show resolved
Hide resolved
sql-plugin/src/main/scala/com/nvidia/spark/rapids/conditionalExpressions.scala
Show resolved
Hide resolved
sql-plugin/src/main/scala/com/nvidia/spark/rapids/conditionalExpressions.scala
Outdated
Show resolved
Hide resolved
sql-plugin/src/main/scala/com/nvidia/spark/rapids/conditionalExpressions.scala
Outdated
Show resolved
Hide resolved
sql-plugin/src/main/scala/com/nvidia/spark/rapids/conditionalExpressions.scala
Outdated
Show resolved
Hide resolved
sql-plugin/src/main/scala/com/nvidia/spark/rapids/conditionalExpressions.scala
Outdated
Show resolved
Hide resolved
sql-plugin/src/main/scala/com/nvidia/spark/rapids/conditionalExpressions.scala
Outdated
Show resolved
Hide resolved
…xpressions.scala Co-authored-by: Jason Lowe <jlowe@nvidia.com>
…xpressions.scala Co-authored-by: Jason Lowe <jlowe@nvidia.com>
…xpressions.scala Co-authored-by: Jason Lowe <jlowe@nvidia.com>
jlowe
reviewed
Jan 5, 2022
sql-plugin/src/main/scala/com/nvidia/spark/rapids/conditionalExpressions.scala
Outdated
Show resolved
Hide resolved
sql-plugin/src/main/scala/com/nvidia/spark/rapids/conditionalExpressions.scala
Outdated
Show resolved
Hide resolved
sql-plugin/src/main/scala/com/nvidia/spark/rapids/conditionalExpressions.scala
Outdated
Show resolved
Hide resolved
…xpressions.scala Co-authored-by: Jason Lowe <jlowe@nvidia.com>
jlowe
reviewed
Jan 5, 2022
sql-plugin/src/main/scala/com/nvidia/spark/rapids/conditionalExpressions.scala
Outdated
Show resolved
Hide resolved
jlowe
approved these changes
Jan 6, 2022
build |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Andy Grove andygrove@nvidia.com
Closes #3849
Detect when a
CASE WHEN
has expressions that have side-effects and only evaluate them for the relevant rows. This follows on from similar work in #4358 forIF ELSE
expressions.There are optimizations to stop evaluating branches if every row has already caused a previous branch predicate to evaluate to true. The scala tests hit these cases and I tested manually by adding debug logging to confirm that the optimizations took effect.