-
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
Add Support for Iceberg table sort orders #21977
Conversation
|
Codenotify: Notifying subscribers in CODENOTIFY files for diff 8789cd9...d0a639b. No notifications. |
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 documentation! I had a few suggestions to help readability, and one question about the formatting of one of the two code examples.
Also please sign the Presto CLA by selecting the "Please click here to be authorized" link in the earlier comment.
d7a8899
to
b65eae5
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.
Thanks for the changes! This is better. I found a nit near the beginning, and I ask if you would recheck the formatting of the first code block example.
8c6b521
to
57e5e2a
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.
LGTM! (docs)
Pull of updated branch, new local build of docs. Thanks for the changes!
57e5e2a
to
07ed82a
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.
Take a first look, some problems for discussion.
icebergTable.sortOrder().fields().stream() | ||
.map(SortField::fromIceberg) | ||
.collect(toImmutableList())); |
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.
Seems haven't support IcebergNativeMetadata
. Maybe try use transaction.replaceSortOrder()
to support sort_by in IcebergNativeMetadata
?
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.
We will analyse and work on 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.
Done
presto-iceberg/src/test/java/com/facebook/presto/iceberg/hive/TestIcebergDistributedHive.java
Outdated
Show resolved
Hide resolved
presto-iceberg/src/test/java/com/facebook/presto/iceberg/hive/TestIcebergDistributedHive.java
Outdated
Show resolved
Hide resolved
07ed82a
to
30ac341
Compare
Hi @evanvdia, just wanted to confirm that are you still working on this? |
Hi @hantangwangd, yes. working on this. |
7b3bd0f
to
3b6903b
Compare
@evanvdia is this ready for review? There is a merge conflict. |
3b6903b
to
ef6df97
Compare
@tdcmeehan Merge conflicts are resolved. But iceberg unit test cases are failing after rebasing. ![]() |
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.
By the way, please give us a notice when this PR is ready for review, thanks.
continue; | ||
} | ||
|
||
Optional<PartitionData> partitionData = getPartitionData(pagePartitioner.getColumns(), transformedPage, position); | ||
WriteContext writer = createWriter(partitionData); | ||
Optional<PartitionData> partitionData = getPartitionData(pagePartitioner.getColumns(), page, position); |
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.
Optional<PartitionData> partitionData = getPartitionData(pagePartitioner.getColumns(), page, position); | |
Optional<PartitionData> partitionData = getPartitionData(pagePartitioner.getColumns(), transformedPage, position); |
After check the code, I think the problem is introduced by this change.
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 @hantangwangd . that was the issue. done the changes. Will let you know once PR is ready for review.
ef6df97
to
32840e1
Compare
32840e1
to
5e60f75
Compare
0089431
f132df0
to
59aa7b6
Compare
@tdcmeehan All changes are done. |
sorted_by = ARRAY['join_date'] | ||
) | ||
|
||
Iceberg Connector does not support sort order transforms.The following sort order transformations are not supported: |
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.
A warning is added when these are used, right? Can you add that information to this documentation?
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.
@tdcmeehan Done
59aa7b6
to
e3c8cc4
Compare
@tdcmeehan Updated the doc. Could you please review. |
@steveburnett can you check the docs one last time? |
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 documentation! A few minor suggestions of phrasing for consistency, nothing major.
e3c8cc4
to
938c2e0
Compare
@steveburnett I have updated the changes. Can you please look into this. |
938c2e0
to
999f8e2
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.
LGTM! (docs)
Pull updated branch, new local doc build, looks good. Thank you!
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.
Please properly attribute this commit in the commit message. See our contributing guide for instructions.
Cherry-pick of trinodb/trino#14891 Co-authored-by: Alexander Jo <jo.alex2144@gmail.com>
999f8e2
to
d0a639b
Compare
Description
Add Support for Iceberg connector to create sorted files. The sort order can be configured with the
sorted_by
table property. When creating the table, can specify an array of one or more columns to use for sorting.Cherry-pick of trinodb/trino#14891
Motivation and Context
Issue : #21978
Test Plan
Contributor checklist
Release Notes
Please follow release notes guidelines and fill in the release notes below.