-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Upgrade Iceberg from 1.0.0 to 1.1.0 #18709
Conversation
b8e3bec
to
2476ce1
Compare
@@ -146,15 +146,15 @@ private static List<Page> buildPages(ConnectorTableMetadata tableMetadata, Conne | |||
.filter(entry -> idToTypeMap.containsKey(entry.getKey())) | |||
.collect(toImmutableMap( | |||
Map.Entry<Integer, ByteBuffer>::getKey, | |||
entry -> Transforms.identity(idToTypeMap.get(entry.getKey())).toHumanString( | |||
entry -> Transforms.identity().toHumanString(idToTypeMap.get(entry.getKey()), |
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.
Transforms.identity(<type>)
has been deprecated and will be removed in 2.0.0, so we can change it now to lazy bind to the given type
assertEquals(Transforms.month(DateType.get()).toString(), "month"); | ||
assertEquals(Transforms.day(DateType.get()).toString(), "day"); | ||
assertEquals(Transforms.hour(TimestampType.withoutZone()).toString(), "hour"); | ||
assertEquals(Transforms.identity().toString(), "identity"); |
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.
specifying the type has been deprecated and will be removed in 2.0.0. The type is only needed at bind time, so we can use the new APIs here rather than waiting until this will be removed
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.
Nice!
2476ce1
to
922ce61
Compare
922ce61
to
fe56b41
Compare
fe56b41
to
385132a
Compare
@ChunxuTang this should be ready for review |
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. @nastra Thanks for your nice work!
assertEquals(Transforms.month(DateType.get()).toString(), "month"); | ||
assertEquals(Transforms.day(DateType.get()).toString(), "day"); | ||
assertEquals(Transforms.hour(TimestampType.withoutZone()).toString(), "hour"); | ||
assertEquals(Transforms.identity().toString(), "identity"); |
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.
Nice!
// nessie writes a "nessie.commit.id" to the table properties | ||
assertThat(materializedRows).hasSize(2); | ||
// nessie writes a "nessie.commit.id" + "gc.enabled=false" to the table properties | ||
assertThat(materializedRows).hasSize(3); |
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.
Just for confirmation: You updated the size from 2 to 3. Is it because you are adding gc.enabled=false
to the properties?
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.
yes exactly
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.
Thanks for the clarification!
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
Looks like Iceberg 1.1.0 has been officially released (https://github.com/apache/iceberg/releases/tag/apache-iceberg-1.1.0), I'm merging this PR. Cc @nastra |
Iceberg-related release notes haven't been published yet, but here's an overview of changes that made it into Iceberg 1.1.0: https://github.com/apache/iceberg/releases/tag/apache-iceberg-1.1.0