spark
spark copied to clipboard
[SPARK-49993][SQL] Improve error messages for Conv, Sum and Average
What changes were proposed in this pull request?
This PR improves messages for ANSI related issues for Conv, Sum and Average. It also adds try_conv expressions that sets failOnError to false by default.
Why are the changes needed?
The PR for removing ANSI suggestion in ARITHMETIC_OVERFLOW was getting too big, so this PR aims to split the work into multiple tasks.
Does this PR introduce any user-facing change?
Yes, new suggestions are added to do try_conv, try_sum and try_average
How was this patch tested?
Tests added.
Was this patch authored or co-authored using generative AI tooling?
No.
@MaxGekk @HyukjinKwon I added tests and fixed one test in DataFrameSuite, as it was not completely using aggFn parameter
+1, LGTM. Merging to master. Thank you, @mihailom-db and @srielau @HyukjinKwon for review.