-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-24951][SQL] Table valued functions should throw AnalysisException #21934
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
|
@rxin, thanks! I am a bot who has found some folks who might be able to help with the review:@hvanhovell, @cloud-fan and @gatorsmile |
|
cc @gatorsmile @ericl who originally wrote this. |
|
LGTM |
|
Test build #93834 has finished for PR 21934 at commit
|
|
Jenkins, retest this please. |
| java.lang.IllegalArgumentException | ||
| Invalid arguments for resolved function: 1, null | ||
| org.apache.spark.sql.AnalysisException | ||
| error: table-valued function range with alternatives: |
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: @rxin will it be better to display the function name within single quotes ?
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.
probably could go either way
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.
@rxin Ok.
|
retest this please |
|
Test build #93849 has finished for PR 21934 at commit
|
gatorsmile
left a comment
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.
LGTM
Thanks! Merged to master.
What changes were proposed in this pull request?
Previously TVF resolution could throw IllegalArgumentException if the data type is null type. This patch replaces that exception with AnalysisException, enriched with positional information, to improve error message reporting and to be more consistent with rest of Spark SQL.
How was this patch tested?
Updated the test case in table-valued-functions.sql.out, which is how I identified this problem in the first place.