-
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
Support updating Iceberg table partitioning #12259
Support updating Iceberg table partitioning #12259
Conversation
Need to add a test for changing a partition transform from |
plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergMetadata.java
Outdated
Show resolved
Hide resolved
plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergMetadata.java
Show resolved
Hide resolved
plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergMetadata.java
Outdated
Show resolved
Hide resolved
is this error message friendly enough for the end user? |
This new feature should land in the iceberg.rst file. |
It seems that while updating the partitioning, the partitioning field This looks like a bug to me. |
95d9c80
to
f25be73
Compare
Thanks for the review @findinpath |
f25be73
to
6aa5d3e
Compare
plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergPartitionEvolution.java
Show resolved
Hide resolved
This is unrelated to this PR
|
That last point relates to #12227 I think |
6aa5d3e
to
1665a2e
Compare
plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergPartitionEvolution.java
Show resolved
Hide resolved
This fixes #7580 too. also, please rebase. |
1665a2e
to
f440f36
Compare
Added a limited test on |
Unless you think that's enough of an issue to try and tackle that here. |
f440f36
to
61b2820
Compare
61b2820
to
928892c
Compare
ALTER TABLE table_name SET PROPERTIES partitioning = ARRAY[<existing partition columns>, 'my_new_partition_column']; | ||
|
||
The current values of a table's properties can be shown using :doc:`SHOW CREATE TABLE </sql/show-create-table>`. | ||
|
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.
@mosabua please review doc changes
plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergMetadata.java
Outdated
Show resolved
Hide resolved
plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergMetadata.java
Outdated
Show resolved
Hide resolved
plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergMetadata.java
Outdated
Show resolved
Hide resolved
plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergMetadata.java
Outdated
Show resolved
Hide resolved
plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergMetadata.java
Outdated
Show resolved
Hide resolved
plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergMetadata.java
Show resolved
Hide resolved
|
||
private static Term toIcebergTerm(Schema schema, PartitionField partitionField) | ||
{ | ||
return Expressions.transform(schema.findColumnName(partitionField.sourceId()), partitionField.transform()); |
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.
It's kind of weird that PartitionSpec
cannot be used directly in UpdatePartitionSpec
and we need to go thru expressions like this.
Do you think it's something we could change in Iceberg API?
cc @rdblue @danielcweeks
(that would be a follow-up for this PR, no change requested here)
a943919
to
de61719
Compare
AC, thanks @findepi |
de61719
to
6b473fd
Compare
plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergMetadata.java
Outdated
Show resolved
Hide resolved
plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergMetadata.java
Outdated
Show resolved
Hide resolved
6b473fd
to
75a7d6c
Compare
plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergMetadata.java
Outdated
Show resolved
Hide resolved
plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergMetadata.java
Outdated
Show resolved
Hide resolved
plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergMetadata.java
Outdated
Show resolved
Hide resolved
plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergTableProperties.java
Outdated
Show resolved
Hide resolved
75a7d6c
to
c94eb0e
Compare
Description
Add support for adding and removing partition fields from Iceberg tables using
ALTER TABLE ... SET PROPERTIES
New feature
Iceberg connector
Related issues, pull requests, and links
Fixes: #12174
Fixes: #7580
Documentation
( ) No documentation is needed.
( ) Sufficient documentation is included in this PR.
( ) Documentation PR is available with #prnumber.
( ) Documentation issue #issuenumber is filed, and can be handled later.
Release notes
( ) No release notes entries required.
( ) Release notes entries required with the following suggested text: