Skip to content

Core, Spark: Verify that TRUNCATE removes orphaned DVs#16078

Open
nastra wants to merge 1 commit intoapache:mainfrom
nastra:truncate-with-dvs
Open

Core, Spark: Verify that TRUNCATE removes orphaned DVs#16078
nastra wants to merge 1 commit intoapache:mainfrom
nastra:truncate-with-dvs

Conversation

@nastra
Copy link
Copy Markdown
Contributor

@nastra nastra commented Apr 22, 2026

This is just adding some additional testing coverage for TRUNCATE after #13222 was introduced, where the row filter is sent as alwaysTrue()

@nastra nastra requested a review from singhpk234 April 22, 2026 12:15
@nastra nastra force-pushed the truncate-with-dvs branch 2 times, most recently from c8668a1 to ed04dfc Compare April 22, 2026 12:48
@nastra nastra force-pushed the truncate-with-dvs branch from ed04dfc to c912617 Compare April 22, 2026 13:58
Copy link
Copy Markdown
Contributor

@anoopj anoopj left a comment

Choose a reason for hiding this comment

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

LGTM

@TestTemplate
public void truncateWithDVs() throws NoSuchTableException {
sql(
"CREATE TABLE %s (id bigint NOT NULL, data string) USING iceberg TBLPROPERTIES ('format-version'='3','write.delete.mode'='merge-on-read')",
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.

Would it make sense to parameterize format version to 3 and above?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

it didn't seem worth to me to parameterize the entire test suite in order to run it across multiple format versions as that adds quite some execution overhead. But I can update if people think it's worth it

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.

I think it makes sense to paramterize unless it's an egregious amount of test time (which I think we should look into separately if it's the case). From a local test on my Mac, run it takes ~20 seconds. I'm mostly looking at it from the perspective of once we make v4 commit path changes which are structurally different we still want to make sure the integration behavior doesn't regress in any manner.

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.

Not a blocker for me though, just my 2c.

@nastra nastra requested a review from amogh-jahagirdar April 22, 2026 15:46
@TestTemplate
public void truncateWithDVs() throws NoSuchTableException {
sql(
"CREATE TABLE %s (id bigint NOT NULL, data string) USING iceberg TBLPROPERTIES ('format-version'='3','write.delete.mode'='merge-on-read')",
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.

I think it makes sense to paramterize unless it's an egregious amount of test time (which I think we should look into separately if it's the case). From a local test on my Mac, run it takes ~20 seconds. I'm mostly looking at it from the perspective of once we make v4 commit path changes which are structurally different we still want to make sure the integration behavior doesn't regress in any manner.

@TestTemplate
public void truncateWithDVs() throws NoSuchTableException {
sql(
"CREATE TABLE %s (id bigint NOT NULL, data string) USING iceberg TBLPROPERTIES ('format-version'='3','write.delete.mode'='merge-on-read')",
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.

Not a blocker for me though, just my 2c.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants