-
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
Disable support for snapshot id within the Iceberg table name #13414
Disable support for snapshot id within the Iceberg table name #13414
Conversation
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/IcebergConfig.java
Show resolved
Hide resolved
plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergMetadata.java
Outdated
Show resolved
Hide resolved
return Optional.of(new SnapshotsTable(systemTableName, typeManager, table)); | ||
case PARTITIONS: | ||
return Optional.of(new PartitionTable(systemTableName, typeManager, table, getSnapshotId(table, name.getSnapshotId(), isAllowLegacySnapshotSyntax(session)))); | ||
return Optional.of(new PartitionTable(systemTableName, typeManager, table, Optional.empty())); |
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.
This looks like a regression to me, does the AS OF
syntax work as a replacement for select * from abc$manifests@456
?
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 have a PR for supporting time travel queries on system tables but it is unfortunately not ready yet.
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.
Probably it is best to introduce the ability to perform time travel queries on system tables before continuing with this PR.
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.
As shown in the PRs:
- Support snapshot queries on Iceberg system tables - IcebergSystemTableHandle is a ConnectorTableHandle with custom
instanceof
handling in IcebergMetadata #13497 - Support snapshot queries on Iceberg system tables - custom IcebergSystemTableHandle extends SystemTableHandle #13854
time travel on system tables incurs added complexity to the Iceberg connector code.
Without concrete demand from the community for time travel functionality on system tables, we leave the above mentioned PRs on hold and go further with disabling support for snapshot id within the Iceberg table name.
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.
This looks like a regression to me
correct
does the
AS OF
syntax work as a replacement forselect * from abc$manifests@456
?
no
The reason we're not pursing the above linked PRs is because we believe there is little community interest in these.
If there isn't general demand on time travel on system tables, we should be OK with carrying out removal of this (already deprecated) functionality.
80a5cca
to
89b53dd
Compare
89b53dd
to
c31a47e
Compare
In the context of deprecating the |
c31a47e
to
2c58a97
Compare
@findinpath there is a test failure. is it related? |
This is used in EXPLAIN. |
@findepi failure of the tests was related to my changes. I fixed the failing test failure and rebased on |
2c58a97
to
3300dee
Compare
2c07399
to
3a85f75
Compare
long snapshotId = endVersion.map(connectorTableVersion -> getSnapshotIdFromVersion(table, connectorTableVersion)) | ||
.orElseGet(() -> resolveSnapshotId(table, name.getSnapshotId().get(), isAllowLegacySnapshotSyntax(session))); | ||
if (endVersion.isPresent()) { | ||
long snapshotId = endVersion.map(connectorTableVersion -> getSnapshotIdFromVersion(table, connectorTableVersion)).get(); |
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.
long snapshotId = endVersion.map(connectorTableVersion -> getSnapshotIdFromVersion(table, connectorTableVersion)).get(); | |
long snapshotId = getSnapshotIdFromVersion(table, endVersion.get()); |
} | ||
|
||
private long resolveSnapshotId(Table table, long id, boolean allowLegacySnapshotSyntax) | ||
private Optional<Long> getSnapshotId(Table 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.
getCurrentSnapshotId
Disable the possibility of specifying the snapshot id within the Iceberg table name. With the introduction of the syntax ``` table1 FOR VERSION AS OF 123 ``` there is no more need of supporting the deprecated syntax: ``` table1@123 ```
3a85f75
to
51187fb
Compare
No release notes since the functionality was already deprecated. |
Description
Disable the possibility of specifying the snapshot id
within the Iceberg table name.
With the introduction of the syntax
there is no more need of supporting the
deprecated syntax:
Other.
Iceberg connector
Use
table1 FOR VERSION AS OF 123
instead oftable1@123
for retrieving the snapshot123
oftable
.Related issues, pull requests, and links
Documentation
(x) 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.
( x) Release notes entries required with the following suggested text: