-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-36336][SQL] Add new exception of base exception used in QueryExecutionErrors #33573
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
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.
@karenfeng I'd rather define cause as type of Exception, What do you think?
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.
cause is always a type of Throwable in the base type and it needs to be propagated, so I think we can leave it as is. But I think we can simplify this class to only accept errorClass and messageParameters (and maybe cause if needed); see SparkArithmeticException as an example.
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.
ok,I will simplify this class to only accept errorClass and messageParameters,also with others. The cause is needed for it in QueryExecutionErrors. Thank you.
|
Can one of the admins verify this patch? |
|
@karenfeng FYI |
82eea33 to
dc9dc9b
Compare
karenfeng
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.
Thanks for doing this! LGTM. @HyukjinKwon, can you also take a look?
|
Any update here? |
Wait for 3.2 release |
|
@HyukjinKwon Could you take a look? |
|
Merged to master. |
| /** | ||
| * Class not found exception thrown from Spark with an error class. | ||
| */ | ||
| class SparkClassNotFoundException( |
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.
shall we mark these classes as private[spark]? cc @gengliangwang
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.
oh yeah
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.
@cloud-fan @HyukjinKwon @gengliangwang I post the follow PR. Could you take a look?
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.
Yes I think so
### What changes were proposed in this pull request? Mark the exception added `private[spark]` according [comments](#33573 (comment)) ### Why are the changes needed? [comments](#33573 (comment)) ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? existed ut testcase Closes #33856 from Peng-Lei/SPARK-36336-FOLLOW. Authored-by: PengLei <[email protected]> Signed-off-by: Hyukjin Kwon <[email protected]>
What changes were proposed in this pull request?
When we refactor the query execution errors to use error classes in QueryExecutionErrors, we need define some exception that mix SparkThrowable into a base Exception type.
according the example SparkArithmeticException
Add SparkXXXException as follows:
SparkClassNotFoundExceptionSparkConcurrentModificationExceptionSparkDateTimeExceptionSparkFileAlreadyExistsExceptionSparkFileNotFoundExceptionSparkNoSuchMethodExceptionSparkIndexOutOfBoundsExceptionSparkIOExceptionSparkSecurityExceptionSparkSQLExceptionSparkSQLFeatureNotSupportedExceptionRefactor some exceptions in QueryExecutionErrors to use error classes and new exception for testing new exception
Some added by PR as follows:
SparkUnsupportedOperationExceptionSparkIllegalStateExceptionSparkNumberFormatExceptionSparkIllegalArgumentExceptionSparkArrayIndexOutOfBoundsExceptionSparkNoSuchElementExceptionWhy are the changes needed?
SPARK-36336
Does this PR introduce any user-facing change?
No
How was this patch tested?
existed ut test