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-43361][PROTOBUF] update documentation for errors related to enum serialization #41188
[SPARK-43361][PROTOBUF] update documentation for errors related to enum serialization #41188
Conversation
36bf491
to
8a30c34
Compare
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.
Suggested a few changes to consider.
@@ -120,7 +120,7 @@ private[sql] class ProtobufSerializer( | |||
catalystPath, | |||
toFieldStr(protoPath), | |||
data.toString, | |||
enumValues.mkString("", ",", "")) | |||
enumValues.mkString("", ", ", "")) |
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 can be replaced with enumValues.mkString(", ")
"sqlColumn" -> "`basic_enum`", | ||
"protobufColumn" -> "field 'basic_enum'", | ||
"data" -> "9999", | ||
"enumString" -> "0, 1, 2")) |
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.
I see, we print the integer values if the the column is int?
"message" : [ | ||
"Cannot convert SQL <sqlColumn> to Protobuf <protobufColumn> because schema is incompatible (protobufType = <protobufType>, sqlType = <sqlType>)." | ||
"Cannot convert SQL <sqlColumn> to Protobuf <protobufColumn> because <data> is not defined in ENUM <enumString>." |
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.
<enumString>
Should this be something like allowed values (<enumString>)
?
@justaparth could you take a look at the comments? Would like to merge asap. |
8a30c34
to
a4e032b
Compare
@rangadi just updated to respond to your comments! |
Thank you! |
cc @HyukjinKwon would you mind taking a look and merging this one? thanks 🙏 |
merged to master |
What changes were proposed in this pull request?
Follows-up on the comment here: #41075 (comment)
Namely:
error-classes.json
andsql-error-conditions.md
to have the updated error name.Why are the changes needed?
Improve documentation
Does this PR introduce any user-facing change?
Yes, documentation.
How was this patch tested?
Existing unit tests