Repository navigation
Add Variant value class for Parquet Variant - #41920
Draft
tarun-google wants to merge 1 commit into
Draft
tarun-google wants to merge 1 commit into
tarun-google wants to merge 1 commit into
Conversation
Beam has no way to represent Variant (semi-structured) data, so it can't exchange Variant values with Iceberg v3, Spark or Flink. This first PR adds a read-only Java value class for the Parquet Variant v1 binary encoding; schema integration and JSON support follow in separate PRs. Design doc: https://docs.google.com/document/d/1m9EQEbGbx6tDEBD7ZTGllYQyHkwY8ACSjfOTTNUVwAk/edit Changes: - Add read-only Variant class that wraps Parquet Variant metadata and value bytes without copying - Add typed getters for every primitive type, plus object and array navigation - Add logical equals and hashCode following the spec's equivalence classes - Add tests for all apache/parquet-testing Variant vectors, large objects and malformed input Tested: $ ./gradlew :sdks:java:core:test --tests 'org.apache.beam.sdk.schemas.variant.*' \ :sdks:java:core:checkstyleMain :sdks:java:core:checkstyleTest :sdks:java:core:spotbugsMain BUILD SUCCESSFUL in 8m 42s VariantTest: tests=11, failures=0, errors=0, skipped=0
This file contains hidden or 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
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.
Beam has no way to represent Variant (semi-structured) data, so it can't exchange Variant values with Iceberg v3, Spark or Flink. This first PR adds a read-only Java value class for the Parquet Variant v1 binary encoding; schema integration and JSON support follow in separate PRs.
Design doc: https://docs.google.com/document/d/1m9EQEbGbx6tDEBD7ZTGllYQyHkwY8ACSjfOTTNUVwAk/edit
Changes:
Tested:
$ ./gradlew :sdks:java:core:test --tests 'org.apache.beam.sdk.schemas.variant.*'
:sdks:java:core:checkstyleMain :sdks:java:core:checkstyleTest :sdks:java:core:spotbugsMain
BUILD SUCCESSFUL in 8m 42s
VariantTest: tests=11, failures=0, errors=0, skipped=0