Use ID-based mapping for struct fields in Iceberg Parquet reader#9104
Closed
findepi wants to merge 4 commits intotrinodb:masterfrom
Closed
Use ID-based mapping for struct fields in Iceberg Parquet reader#9104findepi wants to merge 4 commits intotrinodb:masterfrom
findepi wants to merge 4 commits intotrinodb:masterfrom
Conversation
Member
Author
alexjo2144
reviewed
Sep 3, 2021
plugin/trino-hive/src/main/java/io/trino/plugin/hive/parquet/ParquetColumnIOConverter.java
Outdated
Show resolved
Hide resolved
plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergPageSourceProvider.java
Outdated
Show resolved
Hide resolved
phd3
reviewed
Sep 3, 2021
...roduct-tests/src/main/java/io/trino/tests/product/iceberg/TestIcebergSparkCompatibility.java
Outdated
Show resolved
Hide resolved
plugin/trino-hive/src/main/java/io/trino/plugin/hive/parquet/ParquetColumnIOConverter.java
Outdated
Show resolved
Hide resolved
plugin/trino-hive/src/main/java/io/trino/plugin/hive/parquet/ParquetColumnIOConverter.java
Outdated
Show resolved
Hide resolved
plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/ColumnIdentity.java
Outdated
Show resolved
Hide resolved
f9a2fe7 to
34fc149
Compare
Member
Author
|
AC |
34fc149 to
4ae933c
Compare
findepi
commented
Sep 6, 2021
| List<Type> types = type.getTypeParameters(); | ||
| if (groupColumnIO.getChildrenCount() != 1) { | ||
| Optional<Field> field = getArrayElementField(context, groupColumnIO); | ||
| if (field.isEmpty()) { |
Member
Author
There was a problem hiding this comment.
Note that this refactor isn't absolutely side-effect free.
Previously, we would bail out when groupColumnIO has child count != 1.
And then if constructField returned empty, we would return new GroupField with single empty element.
After the change, we return empty in both cases.
The first attempt at the refactor (the one with more abstract methods, see #9104 (comment)) avoided this situation, but wasn't pretty. Alternatively, #9124 avoids this too, by splitting ParquetColumnIOConverter instead of reusing it.
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.
Fixes #8750