spark icon indicating copy to clipboard operation
spark copied to clipboard

[SPARK-49993][SQL] Improve error messages for Conv, Sum and Average

Open mihailom-db opened this issue 1 year ago • 1 comments

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.

mihailom-db avatar Oct 16 '24 15:10 mihailom-db

@MaxGekk @HyukjinKwon I added tests and fixed one test in DataFrameSuite, as it was not completely using aggFn parameter

mihailom-db avatar Oct 17 '24 08:10 mihailom-db

+1, LGTM. Merging to master. Thank you, @mihailom-db and @srielau @HyukjinKwon for review.

MaxGekk avatar Oct 28 '24 15:10 MaxGekk