-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Support reading from/writing to Iceberg table after partition field dropped #8730
Merged
findepi
merged 3 commits into
trinodb:master
from
findepi:findepi/read-iceberg-dropped-partition
Aug 2, 2021
Merged
Support reading from/writing to Iceberg table after partition field dropped #8730
findepi
merged 3 commits into
trinodb:master
from
findepi:findepi/read-iceberg-dropped-partition
Aug 2, 2021
Conversation
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
findepi
commented
Jul 30, 2021
row("a", "varchar"), | ||
row("b", "varchar"), | ||
// A/B is now partitioning column in the first partitioning spec, and non-partitioning in new one | ||
// TODO (https://github.com/trinodb/trino/issues/8729): $partitions table (as every other table) cannot have duplicate column names |
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
reviewed
Jul 30, 2021
...roduct-tests/src/main/java/io/trino/tests/product/iceberg/TestIcebergPartitionEvolution.java
Show resolved
Hide resolved
hashhar
approved these changes
Jul 31, 2021
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.
LGTM % @alexjo2144's comments.
plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/PartitionFields.java
Show resolved
Hide resolved
phd3
approved these changes
Jul 31, 2021
plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/PartitionFields.java
Show resolved
Hide resolved
...roduct-tests/src/main/java/io/trino/tests/product/iceberg/TestIcebergPartitionEvolution.java
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/TestIcebergPartitionEvolution.java
Show resolved
Hide resolved
Before the change, Trino was not able to read from an Iceberg v1 table in which a partitioning field was removed via Spark. In v1 tables, removed partitioning fields are replaced with `void` transformation to keep field ordinal numbers unchanged, and `void` transformation was not supported.
In v1 tables, removed partitioning fields are replaced with `void` transformation to keep field ordinal numbers unchanged, and `void` transformation was not supported when writing. This commit adds support for writing with `void` transformation and, implicitly, for creating tables with such transformation.
findepi
force-pushed
the
findepi/read-iceberg-dropped-partition
branch
from
August 2, 2021 07:54
e2dd784
to
4f62c46
Compare
findepi
changed the title
Fix reading from Iceberg table after partition field dropped
Support reading from/writing to Iceberg table after partition field dropped
Aug 2, 2021
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.
Before the change, Trino was not able to read from an Iceberg v1 table
in which a partitioning field was removed via Spark. In v1 tables,
removed partitioning fields are replaced with
void
transformation tokeep field ordinal numbers unchanged, and
void
transformation was notsupported.
fixes #8284