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

Comet should not translate try_sum to native sum expression #276

Closed
viirya opened this issue Apr 16, 2024 · 0 comments · Fixed by #277
Closed

Comet should not translate try_sum to native sum expression #276

viirya opened this issue Apr 16, 2024 · 0 comments · Fixed by #277
Assignees
Labels
bug Something isn't working

Comments

@viirya
Copy link
Member

viirya commented Apr 16, 2024

Describe the bug

One more test failure found while working in #250.

SQLQuerySuite:

[info] - SPARK-38548: try_sum should return null if overflow happens before merging *** FAILED *** (179 milliseconds)
[info]   org.apache.spark.SparkException: Job aborted due to stage failure: Task 1 in stage 2306.0 failed 1 times, most recent failure: Lost task 1.0 in stage 2306.0 (TID 2699) (b8cdd0fa496d executor driver): java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1
[info] 	at org.apache.spark.sql.vectorized.ColumnarBatchRow.getBoolean(ColumnarBatchRow.java:97)

It is because the query uses try_sum expression. Currently Comet ignores evalMode parameter for sum and average. Because they might have different aggregation buffer or behavior, we should not simply translate try_sum to sum.

Steps to reproduce

No response

Expected behavior

No response

Additional context

No response

@viirya viirya added the bug Something isn't working label Apr 16, 2024
@viirya viirya self-assigned this Apr 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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant