Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Alternative representations for nullable protobuf fields
The protobuf support in schema registry by default represents an optional field (corresponding in KSQL to a nullable SQL column) by a singular protobuf field. For primitive types, singular protobuf fields cannot distinguish default values (such as 0 for int32 and "" for string) from `null`. This change introduces a new option for KSQL `CREATE` statements that can enable two alternative representations of nullable fields. One is to use nullable protobuf wrappers (e.g. using `google.protobuf.StringValue` for strings), the other is to use the `optional` keyword. Both options will allow KSQL and downstream consumers to clearly distinguish between default values and `null`. New unit tests are added to cover that the properties are propagated from the `CREATE` statement to the `Serde` implementation. We use query translation tests to test end-to-end testcases.
- Loading branch information
Showing
12 changed files
with
505 additions
and
8 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
Oops, something went wrong.