-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-40370][SQL] Migrate type check fails to error classes in CAST #37869
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
Conversation
|
@srielau @anchovYu @cloud-fan @gengliangwang Could you review this PR, please. |
| "srcType" : "\"TINYINT\"", | ||
| "srcType" : "\"TINYINT\"", |
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.
We have a bug when an error message refers to the same param more than once. I will fix this separately.
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.
The fix is trivial. Will do in this PR.
|
The failure "SQLAppStatusListenerMemoryLeakSuite.no memory leak" is not related to the changes, I believe. |
| "If you have to cast <srcType> to <targetType>, you can set <config> as <configVal>." | ||
| ] | ||
| }, | ||
| "CAST_WITH_FUN_SUGGESTION" : { |
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.
nit: FUN is really confusing here. I think FUNC is more commonly used as a short name of FUNCTION
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.
Tell this Rust to programmers ;-)
What changes were proposed in this pull request?
In the PR, I propose to use error classes in the case of type check failure in the
CASTexpression.Why are the changes needed?
Migration onto error classes unifies Spark SQL error messages, and improves search-ability of errors.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
By running the modified test suites: