[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
Open
[SPARK-49634][SQL] Remove the ANSI config suggestion in NUMERIC_VALUE_OUT_OF_RANGE.WITH_SUGGESTION#54644rpnkv wants to merge 11 commits intoapache:masterfrom
rpnkv wants to merge 11 commits intoapache:masterfrom
Conversation
…ted correct behavior.
…sSuite (other tests not yet updated).
… align its semantics with the current implementation (which no longer provides a suggestion).
…'WITH_ROUND_ATTEMPT', as it now represents an attempt to round a decimal number.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.