rangadi opened a new pull request, #40080:
URL: https://github.com/apache/spark/pull/40080
Protobuf serializer (used in `to_protobuf()`) should error if non-nullable
fields (i.e. protobuf `required` fields) are present in the schema of the
catalyst record being converted to a protobuf.
But `isNullable()` method used for this check returns opposite (see PR
comment in the diff). As a result, Serializer incorrectly requires the fields
that are optional. This PR fixes this check (see PR comment in the diff).
This also requires corresponding fix for couple of unit tests. In order use
a Protobuf message with a `required` field, Protobuf version 2 file
`proto2_messages.proto` is added.
Two tests are updated to verify missing required fields results in an error.
### How was this patch tested?
- Updated unit tests
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]