Skip to content

[SPARK-49634][SQL] Remove the ANSI config suggestion in NUMERIC_VALUE_OUT_OF_RANGE.WITH_SUGGESTION#54644

Open
rpnkv wants to merge 11 commits intoapache:masterfrom
rpnkv:num_val_out_of_range_suggestion_fix
Open

[SPARK-49634][SQL] Remove the ANSI config suggestion in NUMERIC_VALUE_OUT_OF_RANGE.WITH_SUGGESTION#54644
rpnkv wants to merge 11 commits intoapache:masterfrom
rpnkv:num_val_out_of_range_suggestion_fix

Conversation

@rpnkv
Copy link

@rpnkv rpnkv commented Mar 5, 2026

What changes were proposed in this pull request?

Removed the ANSI turn-off suggestion for the NUMERIC_VALUE_OUT_OF_RANGE error.

The file "common/utils/src/main/resources/error/error-conditions.json" contains two subclasses for this error. Since one of them (WITH_SUGGESTION) no longer contains a suggestion, I renamed it to DEFAULT. The other subclass (WITHOUT_SUGGESTION) was renamed to WITH_ROUND_ATTEMPT to better reflect its actual semantics (it now indicates an attempted rounding of a decimal value).

Why are the changes needed?

Now that in Spark 4.0.0 we have moved to ANSI mode on by default, we want to keep suggestions of this kind to the minimum. The good thing is that both errors have other suggestions which are sufficient.

Does this PR introduce any user-facing change?

Yes, error message has changed.

How was this patch tested?

Existing tests, plus one additional test added to QueryExecutionErrorsSuite since there were no tests for the QueryExecutionErrors method that uses the NUMERIC_VALUE_OUT_OF_RANGE.WITH_SUGGESTION error template.

Was this patch authored or co-authored using generative AI tooling?

No.

@HyukjinKwon HyukjinKwon changed the title [SPARK-49634] Remove the ANSI config suggestion in NUMERIC_VALUE_OUT_OF_RANGE.WITH_SUGGESTION [SPARK-49634][SQL] Remove the ANSI config suggestion in NUMERIC_VALUE_OUT_OF_RANGE.WITH_SUGGESTION Mar 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant