Skip to content
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

Fix past table versions listing in vacuum procedure #22816

Merged

Conversation

SemionPar
Copy link
Contributor

@SemionPar SemionPar commented Jul 25, 2024

Description

When listing past table versions, correctly break iteration once we get to a file which no longer exists, e.g. removed by an external system.

Additional context and related issues

Motivation: vacuum procedure call would otherwise fail with NullPointerException when setting the retention to a value which overlaps with externally deleted log file.

Release notes

# Delta Lake
* Fix failure when executing `vacuum` procedure on tables which don't have old transaction logs. ({issue}`22816`)

When listing past table versions, correctly break
iteration once we get to a file which no longer exists,
e.g. removed by an external system.

Co-authored-by: Marius Grama <findinpath@gmail.com>
@cla-bot cla-bot bot added the cla-signed label Jul 25, 2024
@github-actions github-actions bot added the delta-lake Delta Lake connector label Jul 25, 2024
assertQuery("SELECT * FROM " + tableName, "VALUES 2, 3");
Set<String> updatedFiles = getActiveFiles(tableName);

assertUpdate("CALL system.vacuum(schema_name => CURRENT_SCHEMA, table_name => '" + tableName + "', retention => '7d')");
Copy link
Member

Choose a reason for hiding this comment

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

No requested change. We could simply named arguments:

assertUpdate("CALL system.vacuum(CURRENT_SCHEMA, '" + tableName + "', '7d')");

@ebyhr ebyhr merged commit 26e5bc4 into trinodb:master Jul 25, 2024
24 checks passed
@github-actions github-actions bot added this to the 453 milestone Jul 25, 2024
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.

4 participants