Skip to content
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

[BUG] Short circuit AND/OR in ANSI mode #4526

Closed
revans2 opened this issue Jan 13, 2022 · 0 comments · Fixed by #4760
Closed

[BUG] Short circuit AND/OR in ANSI mode #4526

revans2 opened this issue Jan 13, 2022 · 0 comments · Fixed by #4760
Assignees
Labels
bug Something isn't working P1 Nice to have for release

Comments

@revans2
Copy link
Collaborator

revans2 commented Jan 13, 2022

Describe the bug
AND/OR on the CPU in Spark will process the LHS unconditionally. But they will only process the RHS if they cannot figure out the result from just the lhs.

On the GPU we process both unconditionally, but in ANSI mode we can run into problems just like with #3849. We should do a similar fix for AND/OR like we did for IF/ELSE, and follow what Spark does on the CPU. For AND if the RHS has side effects we only process it for rows where the LHS is not false (this includes nulls). For OR if the RHS has side effects we only process it for rows where the LHS is not true (this includes nulls).

@revans2 revans2 added bug Something isn't working ? - Needs Triage Need team to review and classify labels Jan 13, 2022
@sameerz sameerz added P1 Nice to have for release and removed ? - Needs Triage Need team to review and classify labels Jan 18, 2022
@amahussein amahussein self-assigned this Feb 2, 2022
@sameerz sameerz changed the title [BUG] Short cuircit AND/OR in ANSI mode [BUG] Short circuit AND/OR in ANSI mode Feb 15, 2022
@nartal1 nartal1 mentioned this issue Apr 5, 2022
49 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P1 Nice to have for release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants