-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Handle Iceberg files with missing Field IDs #9959
Conversation
84d52a5
to
1dc6a09
Compare
1dc6a09
to
9ab109f
Compare
...roduct-tests/src/main/java/io/trino/tests/product/iceberg/TestIcebergSparkCompatibility.java
Show resolved
Hide resolved
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.
looks good generally, can you please rebase?
...roduct-tests/src/main/java/io/trino/tests/product/iceberg/TestIcebergSparkCompatibility.java
Outdated
Show resolved
Hide resolved
plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergPageSourceProvider.java
Show resolved
Hide resolved
plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergPageSourceProvider.java
Outdated
Show resolved
Hide resolved
.forEach(column -> columnsById.put(getIcebergFieldId(column), column)); | ||
.forEach(column -> { | ||
String fieldId = (column.getAttributes().get(ORC_ICEBERG_ID_KEY)); | ||
if (fieldId != null) { |
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.
could you explain the motivation for this? Shouldn't setMissingFieldIds
throw for the null case before this?
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.
This can happen if the column does not have an id and the default name mapping is not present. @findepi suggested maybe we should fail in the case rather than having the column values be null
#9843 (comment)
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 okay with returning null here, similar to Spark.
...roduct-tests/src/main/java/io/trino/tests/product/iceberg/TestIcebergSparkCompatibility.java
Outdated
Show resolved
Hide resolved
...roduct-tests/src/main/java/io/trino/tests/product/iceberg/TestIcebergSparkCompatibility.java
Outdated
Show resolved
Hide resolved
...roduct-tests/src/main/java/io/trino/tests/product/iceberg/TestIcebergSparkCompatibility.java
Show resolved
Hide resolved
9ab109f
to
b95d365
Compare
Rebased and comments addressed, thanks for the review @phd3 |
b95d365
to
d1062c6
Compare
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.
@alexjo2144 LGTM, can you please squash? will merge if there're no other comments.
d1062c6
to
9d6fb5e
Compare
Squashed and rebased for merge conflicts. Thanks @phd3 |
Based off of the Dereference Pushdown PR: #8129Last commit is new.In progress PR for documenting the Iceberg NameMapping JSON: apache/iceberg#3556
more discussion on #9843