[SPARK-58129][SQL] Assign a name to the error class _LEGACY_ERROR_TEMP_0031#57261
Open
Ma77Ball wants to merge 3 commits into
Open
[SPARK-58129][SQL] Assign a name to the error class _LEGACY_ERROR_TEMP_0031#57261Ma77Ball wants to merge 3 commits into
Ma77Ball wants to merge 3 commits into
Conversation
…P_0031
Replace _LEGACY_ERROR_TEMP_0031 ("Invalid number of buckets:
<describe>.") with a proper error condition. Its meaning overlaps the
existing INVALID_BUCKET_COUNT (a valid integer bucket count that is out
of range), so fold both into INVALID_BUCKET_COUNT as sub-conditions:
NON_INTEGER_LITERAL (the former legacy error, raised at parse time) and
OUT_OF_RANGE (the existing analysis-time check).
…T.NON_INTEGER_LITERAL
…ted these test to use checkerror()
Author
|
cc @MaxGekk or @gengliangwang, PTAL this PR names the legacy error class _LEGACY_ERROR_TEMP_0031 under INVALID_BUCKET_COUNT as a sub-condition (SPARK-58129 part of SPARK-37935) |
067817b to
8eff8b1
Compare
uros-b
approved these changes
Jul 15, 2026
uros-b
left a comment
Member
There was a problem hiding this comment.
Thank you @Ma77Ball! @MaxGekk @cloud-fan PTAL when you have some time.
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?
Give the legacy error class
_LEGACY_ERROR_TEMP_0031a proper name. It is raised when the count in abucket(...)partition transform is not an integer literal (e.g.bucket('x', c)). Since it overlaps the existingINVALID_BUCKET_COUNT, both are grouped as sub-conditions:INVALID_BUCKET_COUNT.NON_INTEGER_LITERAL- the former_LEGACY_ERROR_TEMP_0031.INVALID_BUCKET_COUNT.OUT_OF_RANGE- the existing out-of-range check.Why are the changes needed?
Part of the effort to name legacy error classes (parent SPARK-37935): replace an unnamed placeholder with a stable, meaningful condition.
Does this PR introduce any user-facing change?
Yes.
_LEGACY_ERROR_TEMP_0031becomesINVALID_BUCKET_COUNT.NON_INTEGER_LITERAL, and the existingINVALID_BUCKET_COUNTbecomesINVALID_BUCKET_COUNT.OUT_OF_RANGE. Messages and parameters are unchanged.How was this patch tested?
Added a
QueryParsingErrorsSuitetest for the parse error, updated the existingSparkConnectProtoSuitetest, andSparkThrowableSuitepasses.Was this patch authored or co-authored using generative AI tooling?
Yes, co-authored with Claude Opus 4.8