-
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
Time travel engine improvements #12542
Conversation
core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorMetadata.java
Outdated
Show resolved
Hide resolved
core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorMetadata.java
Outdated
Show resolved
Hide resolved
core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorMetadata.java
Show resolved
Hide resolved
8c2ad46
to
2c8254b
Compare
previously CI #12726 |
Rebasing after #10258 merged. |
ec48889
to
1626d64
Compare
CI #12726 |
adding small change to address #10258 (comment) |
e88535a
to
50b12f2
Compare
previous CI #12726 |
conflict, rebasing |
a4766ac
to
c026a60
Compare
bffdacd
to
23580da
Compare
Build is green again. There were some changes (#12542 (comment)). @losipiuk or @martint PTAL. |
* some weird way, serving as a smoke test for versioning. The purpose of the test is to validate the connector does proper validation. | ||
*/ | ||
@Test | ||
public void testTrySelectTableVersion() |
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 am not sure I get the intent here. Is there expectation from specific connector to provide more verbose version of this test which actually verifies specifically which query should fail and which should not?
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.
My expectation is that a connector supporting time travel will have its own test covering it.
Here, we only cover cases and verify they don't end up with some NPE, IAE, ISE or something.
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 nice
core/trino-spi/src/test/java/io/trino/spi/TestSpiBackwardCompatibility.java
Show resolved
Hide resolved
Move versioned `getTableHandle` under the plain one.
When querying a table `FOR VERSION` there are these potential failure scenarios 1. The table doesn't exist. 2. The connector doesn't support versioning at all. 3. The connector does not support given version type is not supported (e.g. supported versions are `bigint` (as in Iceberg) but user. provided a `varchar`) 4. The version type is fine, but requested version doesn't exist (e.g. bad Iceberg snapshot id). Previously, when connector doesn't support versioning *and* table doesn't exist, the message would indicate unsupported versioning, while informing about table not being found is more appropriate. To further differentiate between failure scenarios 2, 3 and 4, the `ConnectorMetadata.isValidTableVersion` is removed. Instead, we rely on `ConnectorMetadata.getTableHandle` to do proper checks (is versioning supported? is version type supported? is version valid?). A sane implementation will do such checks anyway, so this simplifies the SPI.
If a connector implements table versioning, it's going to implement `getTableHandle` that accepts optional version specification. It shouldn't need to still implement the `getTableHandle` without versioning specification.
23580da
to
6b62b43
Compare
(rebased to resolve conflict) |
Do we want release notes for this? |
Test is added in scope of #12831 |
No description provided.