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] Audit and fix/test hasSideEffects #11171

Open
revans2 opened this issue Jul 11, 2024 · 0 comments
Open

[BUG] Audit and fix/test hasSideEffects #11171

revans2 opened this issue Jul 11, 2024 · 0 comments
Labels
bug Something isn't working Spark 4.0+ Spark 4.0+ issues

Comments

@revans2
Copy link
Collaborator

revans2 commented Jul 11, 2024

Describe the bug
we added in hasSideEffects a long time ago to be able to deal with conditional expressions where an exception might be thrown. Spark does lazy evaluation on the CPU but we tend to evaluation both sides greedily. We detect when we need to be lazy based on the hasSideEffects method. But this does not look like it was properly maintained. Things like GpuBinaryArithmetic expressions that just check for ANSI mode instead of checking to see if failOnError returns true.

This ends up being both a performance problem in some cases and a correctness problem in others.

Steps/Code to reproduce bug
Bitwise operations in ANSI mode says it could throw an exception, but it cannot.

GpuAdd in ANSI mode says it has side effects in cases it does not.

I just don't trust that all of our expressions are doing the right thing here and we need to check them all and add tests to verify that they are doing what we expect.

@revans2 revans2 added bug Something isn't working ? - Needs Triage Need team to review and classify labels Jul 11, 2024
@mattahrens mattahrens added Spark 4.0+ Spark 4.0+ issues and removed ? - Needs Triage Need team to review and classify labels Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Spark 4.0+ Spark 4.0+ issues
Projects
None yet
Development

No branches or pull requests

2 participants