-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Preserve table features on CREATE OR REPLACE TABLE
#27943
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
base: master
Are you sure you want to change the base?
Preserve table features on CREATE OR REPLACE TABLE
#27943
Conversation
|
The CI failure is related to this change. |
3358586 to
ae75b5e
Compare
Following the spec in the https://github.com/delta-io/delta/blob/master/PROTOCOL.md#table-features, we should write the `readerFeatures` when reader version is 3, write the `writeFeatures` when writer version is 7.
ae75b5e to
d24cf0f
Compare
...io/trino/tests/product/deltalake/TestDeltaLakeCreateOrReplaceTableAsSelectCompatibility.java
Outdated
Show resolved
Hide resolved
...io/trino/tests/product/deltalake/TestDeltaLakeCreateOrReplaceTableAsSelectCompatibility.java
Show resolved
Hide resolved
6915d7d to
47b0e39
Compare
...n/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/transactionlog/ProtocolEntry.java
Show resolved
Hide resolved
...io/trino/tests/product/deltalake/TestDeltaLakeCreateOrReplaceTableAsSelectCompatibility.java
Outdated
Show resolved
Hide resolved
| } | ||
|
|
||
| @Test(groups = {DELTA_LAKE_OSS, PROFILE_SPECIFIC_TESTS}) | ||
| public void testCreateOrReplaceTableOnlyDiscardFeaturesOnTrino() |
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 feel that the test name doesn't match what the test actually verifies. Which assertion ensures "OnlyDiscardFeaturesOnTrino"?
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.
renamed to "testCreateOrReplaceTableWithOnlyFeaturesChangedOnTrino", I want to say: it tests the create or replace and with only discard a feature on Trino, do you have suggestions on the name?
...io/trino/tests/product/deltalake/TestDeltaLakeCreateOrReplaceTableAsSelectCompatibility.java
Outdated
Show resolved
Hide resolved
According to https://github.com/delta-io/delta/blob/master/PROTOCOL.md#table-features-for-new-and-existing-tables, retain existing read and write features when executing `CREATE OR REPLACE TABLE`, as previous table data may still depend on them.
47b0e39 to
bf52914
Compare
Description
Fixes the issue #27886 (comment) :
Follow the #27886 (comment) :
Additional context and related issues
Release notes
( ) This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required. Please propose a release note for me.
(x) Release notes are required, with the following suggested text: