forked from apache/parquet-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Variant shredding #1
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
Closed
Closed
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
ad22aa0
Bump com.google.api.grpc:proto-google-common-protos (#3177)
dependabot[bot] b69149f
Bump Parquet Format to 2.11 (#3181)
Fokko 6fe139e
Enable jitpack.io repo only when brotli is required (#3180)
pan3793 a24ea5c
Minor: Use logicaltypes constants in ParquetMetadataConverter (#3186)
aihuaxu 00b6bab
GH-3188: Set the global configured column stats enable flag to defaul…
huaxiangsun 66e0c4e
GH-3070: Add Variant logical type annotation to parquet-java (#3072)
aihuaxu a8c8997
Variant support from https://github.com/apache/parquet-java/pull/3117
cashmand f86b924
Create VariantSchema
cashmand 2d708a3
Fix after rebase
cashmand 186301a
Remove hack
cashmand 90db4cc
Fix tests
cashmand ddd7090
Set explicit schema
cashmand be9321c
More tests
cashmand 733f445
Fix to handle empty object
cashmand b15d8ba
More tests, cleanup
cashmand 58ffda7
More tests
cashmand 68f407c
More tests
cashmand 58e8760
Cleanup
cashmand 2276e00
Handle conflicting empty object and non-object, add test
cashmand d191886
Fix offset issue and add test
cashmand 67bace9
Finish porting remaining Iceberg tests
cashmand 46f9a63
Cleanup
cashmand 3761848
Cleanup
cashmand 78e2935
import Assert.*
cashmand 7ea19b0
Cleanup
cashmand b5f6c20
Match Iceberg on invalid values, and more cleanup
cashmand File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,6 +35,7 @@ | |
| import org.apache.parquet.io.api.GroupConverter; | ||
| import org.apache.parquet.io.api.PrimitiveConverter; | ||
| import org.apache.parquet.schema.GroupType; | ||
| import org.apache.parquet.schema.LogicalTypeAnnotation; | ||
| import org.apache.parquet.schema.MessageType; | ||
| import org.apache.parquet.schema.Type; | ||
|
|
||
|
|
@@ -168,7 +169,12 @@ private static Converter newConverter(Schema schema, Type type, GenericData mode | |
| case MAP: | ||
| return new MapConverter(parent, type.asGroupType(), schema, model); | ||
| case RECORD: | ||
| return new AvroIndexedRecordConverter<>(parent, type.asGroupType(), schema, model); | ||
| if (type.getLogicalTypeAnnotation() | ||
| instanceof LogicalTypeAnnotation.VariantLogicalTypeAnnotation) { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Continuation indent should be 2 indents (4 spaces) |
||
| return new AvroConverters.FieldVariantConverter(parent, type.asGroupType(), schema, model); | ||
| } else { | ||
| return new AvroIndexedRecordConverter<>(parent, type.asGroupType(), schema, model); | ||
| } | ||
| case STRING: | ||
| return new AvroConverters.FieldStringConverter(parent); | ||
| case UNION: | ||
|
|
||
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
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
Oops, something went wrong.
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.
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.
Don't we want to produce a
Variantfrom apache#3072 rather than a record with a record determined by the schema?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'm not sure I understand the comment. I'm not that familiar with Avro, but doesn't the type we produce need to be an Avro type? What would it mean to produce a
Variant?