-
Notifications
You must be signed in to change notification settings - Fork 28k
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-42057][SQL][PROTOBUF] Fix how exception is handled in error reporting. #39536
Closed
Conversation
This file contains 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
@SandishKumarHN please take a look. |
rangadi
commented
Jan 12, 2023
@@ -229,7 +229,7 @@ private[sql] object ProtobufUtils extends Logging { | |||
fileDescriptorSet = DescriptorProtos.FileDescriptorSet.parseFrom(dscFile) | |||
} catch { | |||
case ex: InvalidProtocolBufferException => | |||
throw QueryCompilationErrors.descrioptorParseError(descFilePath, ex) | |||
throw QueryCompilationErrors.descriptorParseError(descFilePath, ex) |
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.
This is a typo fix in function name.
rangadi
changed the title
[SQL][PROTOBUF] Fix how exception is handled in error reporting.
[SPARK-42057][SQL][PROTOBUF] Fix how exception is handled in error reporting.
Jan 13, 2023
SandishKumarHN
approved these changes
Jan 13, 2023
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.
this makes sense, not sure how we missed it.
LGTM.
connector/protobuf/src/test/scala/org/apache/spark/sql/protobuf/ProtobufFunctionsSuite.scala
Show resolved
Hide resolved
rangadi
requested review from
gengliangwang
and removed request for
gengliangwang
January 13, 2023 20:00
sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryCompilationErrors.scala
Show resolved
Hide resolved
gengliangwang
approved these changes
Jan 13, 2023
Thanks, merging to master |
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?
Protobuf connector related error handlers incorrectly report the exception. This is makes it hard for users to see actual issue. E.g. if there is a
FileNotFoundException
these error handlers use passexception.getCause()
rather than passingexception
. As result, we lose the information that it was aFileNotFoundException
This PR fixes that.
Why are the changes needed?
This improves error reporting.
Does this PR introduce any user-facing change?
No.
How was this patch tested?