Skip to content

Conversation

@szehon-ho
Copy link
Member

Closes #4139

It was decided there to make it into a separate table.

This change refactors some of the DataFilesTable logic (like schema, partition pruning) into a base class and re-uses it for DeleteFilesTable.

.withPartition(TestHelpers.Row.of(0))
.withRecordCount(1)
.build();
static final DataFile FILE_PARTITION_1 = DataFiles.builder(SPEC)
Copy link
Member Author

Choose a reason for hiding this comment

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

This is just some minor cleanup to unify some of the test tables used in "TestMetadataTableScans", I had added these sometime ago and noticed they are actually the same as the more commonly used FILES_A, FILES_B, etc.

Copy link
Contributor

@aokolnychyi aokolnychyi left a comment

Choose a reason for hiding this comment

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

I think the approach is correct but I'd love to share more logic, if possible.

caseSensitive)
.project(rowFilter);

ManifestEvaluator manifestEval = ManifestEvaluator.forPartitionFilter(
Copy link
Contributor

Choose a reason for hiding this comment

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

It is not related to this PR but this logic may not be correct. We should create an issue and follow up. We always pass the current spec. Instead, we should use the spec to which our particular manifest belongs to.

Copy link
Contributor

Choose a reason for hiding this comment

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

In addition, we should support predicate pushdown in ALL_DATA_FILES.

Copy link
Member Author

Choose a reason for hiding this comment

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

It is not related to this PR but this logic may not be correct. We should create an issue and follow up. We always pass the current spec. Instead, we should use the spec to which our particular manifest belongs to.

Made the issue: #4271

Copy link
Member Author

@szehon-ho szehon-ho Mar 5, 2022

Choose a reason for hiding this comment

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

In addition, we should support predicate pushdown in ALL_DATA_FILES.

Yea this is on my list, I was thinking after this base class it will make this much easier.

@szehon-ho szehon-ho force-pushed the delete_file_table_master branch from 4857613 to 3fbc71f Compare March 5, 2022 01:36
Copy link
Contributor

@aokolnychyi aokolnychyi left a comment

Choose a reason for hiding this comment

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

This change looks almost ready. I had some final nits.
I'll take a look at tests with fresh eyes tomorrow.

@szehon-ho szehon-ho force-pushed the delete_file_table_master branch from cc6b575 to 6ddb266 Compare March 10, 2022 18:19
@szehon-ho
Copy link
Member Author

Thanks for taking a look @aokolnychyi , changed to address comments

Copy link
Contributor

@aokolnychyi aokolnychyi left a comment

Choose a reason for hiding this comment

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

LGTM.

@szehon-ho szehon-ho merged commit ad1e634 into apache:master Mar 11, 2022
@szehon-ho
Copy link
Member Author

Thanks @aokolnychyi for the detailed review

sunchao pushed a commit to sunchao/iceberg that referenced this pull request May 9, 2023
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.

Add Delete Files To Files metadata table

2 participants