-
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 Iceberg refs system table #15649
Conversation
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.
How do you feel about calling the table REFERENCES
spelled out?
This also needs to be added to iceberg.rst
for the docs here: https://trino.io/docs/current/connector/iceberg.html#metadata-tables
plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/RefsTable.java
Outdated
Show resolved
Hide resolved
I am using |
See for reference: https://github.com/apache/iceberg/blob/master/format/spec.md#snapshot-reference |
@alexjo2144 updated everything except the name |
} | ||
|
||
if (ref.minSnapshotsToKeep() != null) { | ||
pagesBuilder.appendInteger(ref.minSnapshotsToKeep()); |
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.
You could add in PageListBuilder
new methods:
appendInteger(Integer)
appendBigint(Long)
to encapsulate the null
check and make the code in this class more concise.
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.
Added new methods as suggested
@ebyhr or @findepi either of you have thoughts on this? Matching the other engines vs spelling the whole word out. |
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 to me, pending input from maintainers on the table name.
``$refs`` 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.
I think these are supposed to match width. @mosabua might want to take a look at the docs addition, but thanks for adding it
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.
Updated to match the width
plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/util/PageListBuilder.java
Show resolved
Hide resolved
plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/RefsTable.java
Show resolved
Hide resolved
This pull request has gone a while without any activity. Tagging the Trino developer relations team: @bitsondatadev @colebow @mosabua |
@jackye1995, would you mind replying to the last comments here please? @ebyhr %comments, is this ready to be merged? |
e68b82b
to
864d1e2
Compare
@ebyhr sorry did not notice you have one more comment, updated. Let me know if there is anything else needed. |
Thanks @jackye1995! After that @ebyhr should take a look shortly! You rock! |
3b429eb
to
72e6606
Compare
I think it's fine to match the other implementations, especially since the intent here is to have the same schema. |
Could you rebase on master to resolve conflicts? |
Can I get a confirmation if this PR is ever gonna be merged once rebased? If not I will just go ahead to apply the patch internally and you can close this PR instead of me continuing to rebase. |
@jackye1995 I'm meeting with @electrum tomorrow I'll ask him to respond. I really want this one to land! |
@jackye1995 would you also be able to do this change suggested by David to go back to I will also update you on what David says about how close this is to merge. |
The current implementation is already |
Ooops 🫣🫠 |
Close PR, this will be available in AWS Athena by 3/31 in all AWS regions. |
Sorry for the confusion on this. I'll merge after the test passes. Thanks for your work on this! |
@electrum looks like the tests passed! Are we ready to merge this? |
There was another conflict. Rebased again. |
Per @ebyhr 's #16576 it seems the PR broke master builds. |
Description
Support refs system table in Iceberg
Additional context and related issues
Users can query the system table with:
The schema is the same as the one in Iceberg repo: https://github.com/apache/iceberg/blob/master/core/src/main/java/org/apache/iceberg/RefsTable.java
Release notes
( ) This is not user-visible or docs only and no release notes are required.
(x) Release notes are required, please propose a release note for me.
( ) Release notes are required, with the following suggested text: