Skip to content

Use Location API for path concatenation when cleaning extra output files after DML in Delta #17560

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

Merged
merged 2 commits into from
May 26, 2023

Conversation

losipiuk
Copy link
Member

Release notes

(x) This is not user-visible or docs only and no release notes are required.
( ) Release notes are required, please propose a release note for me.
( ) Release notes are required, with the following suggested text:

@cla-bot cla-bot bot added the cla-signed label May 18, 2023
@losipiuk losipiuk requested review from findinpath and findepi May 18, 2023 18:39
@github-actions github-actions bot added the delta-lake Delta Lake connector label May 18, 2023
@losipiuk losipiuk requested review from electrum and ebyhr May 18, 2023 18:39
@@ -2774,7 +2770,11 @@ private void cleanExtraOutputFiles(ConnectorSession session, String queryId, Loc
FileIterator iterator = fileSystem.listFiles(location);
while (iterator.hasNext()) {
Location file = iterator.next().location();
if (isFileCreatedByQuery(file, queryId) && !filesToKeep.contains(file.toString())) {
if (!file.parentDirectory().equals(location)) {
Copy link
Member

Choose a reason for hiding this comment

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

This is not the only place with such logic.
Looks like file system could have consistent logic for listing files non-recuirsively.

Copy link
Member Author

Choose a reason for hiding this comment

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

Agreed.

@electrum I assume it was a conscious decision to just have recursive file listing in new file system interface?
Can you shed some light on that - especially are there any hard reasons not to extend the API?

Copy link
Member Author

@losipiuk losipiuk May 23, 2023

Choose a reason for hiding this comment

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

@losipiuk losipiuk merged commit ac29996 into trinodb:master May 26, 2023
@github-actions github-actions bot added this to the 419 milestone May 26, 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.

2 participants