New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SPARK-41582][CORE][SQL] Reuse INVALID_TYPED_LITERAL
instead of _LEGACY_ERROR_TEMP_0022
#39122
Conversation
Literal(Hex.decodeHex(padding + value)) | ||
} catch { | ||
case e: DecoderException => | ||
val ex = QueryParsingErrors.cannotParseValueTypeError("X", value, ctx) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pass X
?HEX
or HEXBINARY
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
X
is ok
Seq("DATE", "TIMESTAMP_NTZ", "TIMESTAMP_LTZ", "TIMESTAMP", "INTERVAL", "X"), | ||
ctx) | ||
} | ||
} catch { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems only line 2439 will throw IllegalArgumentException, let's test
Literal(Hex.decodeHex(padding + value)) | ||
} catch { | ||
case e: DecoderException => | ||
val ex = QueryParsingErrors.cannotParseValueTypeError("X", value, ctx) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
X
is ok
+1, LGTM. Merging to master. |
Thanks @MaxGekk |
What changes were proposed in this pull request?
This pr aims reuse
INVALID_TYPED_LITERAL
instead of_LEGACY_ERROR_TEMP_0022
.Why are the changes needed?
Proper names of error classes to improve user experience with Spark SQL.
Does this PR introduce any user-facing change?
Yes, the PR changes user-facing error message.
How was this patch tested?
Pass GitHub Actions