Skip to content

Add support for TRUNCATE TABLE statement in Delta Lake#18788

Merged
ebyhr merged 1 commit intomasterfrom
ebi/delta-truncate
Aug 28, 2023
Merged

Add support for TRUNCATE TABLE statement in Delta Lake#18788
ebyhr merged 1 commit intomasterfrom
ebi/delta-truncate

Conversation

@ebyhr
Copy link
Copy Markdown
Member

@ebyhr ebyhr commented Aug 24, 2023

Description

Fixes #18786

Release notes

(x) Release notes are required, with the following suggested text:

# Delta Lake
* Add support for `TRUNCATE TABLE` statement. ({issue}`18786`)

@cla-bot cla-bot bot added the cla-signed label Aug 24, 2023
@github-actions github-actions bot added tests:hive delta-lake Delta Lake connector labels Aug 24, 2023
@ebyhr ebyhr self-assigned this Aug 24, 2023
@ebyhr ebyhr force-pushed the ebi/delta-truncate branch 3 times, most recently from 4473e9f to 649021f Compare August 25, 2023 02:29
@ebyhr
Copy link
Copy Markdown
Member Author

ebyhr commented Aug 25, 2023

suite-delta-lake-databricks113 hit timeout #18805
suite-compatibility failed due to missing trinodb/trino:425. We can ignore this failure because it's in a release window.

@ebyhr ebyhr force-pushed the ebi/delta-truncate branch from 649021f to 548d664 Compare August 27, 2023 22:53
@ebyhr ebyhr requested a review from findepi August 27, 2023 22:54
public static final String MERGE_OPERATION = "MERGE";
public static final String UPDATE_OPERATION = "UPDATE"; // used by old Trino versions and Spark
public static final String DELETE_OPERATION = "DELETE"; // used Trino for whole table/partition deletes as well as Spark
public static final String TRUNCATE_OPERATION = "TRUNCATE";
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SUPPORTS_SET_COLUMN_TYPE,
SUPPORTS_TOPN_PUSHDOWN,
SUPPORTS_TRUNCATE -> false;
SUPPORTS_TOPN_PUSHDOWN -> false;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this shouldn't use enhanced switch (so that single item modification is a single line change, not two)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, i see this was recently changed and discussed here #18783 (review)

@ebyhr ebyhr merged commit 1e41c3c into master Aug 28, 2023
@ebyhr ebyhr deleted the ebi/delta-truncate branch August 28, 2023 22:34
@github-actions github-actions bot added this to the 426 milestone Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed delta-lake Delta Lake connector

Development

Successfully merging this pull request may close these issues.

Add support for TRUNCATE TABLE statement in Delta Lake connector

3 participants