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

Core: Fix failure when reading files table with branch #11719

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ebyhr
Copy link
Contributor

@ebyhr ebyhr commented Dec 7, 2024

SnapshotScan.useRef returns the base table's schema instead of metadata table's schema:

return newRefinedScan(table(), SnapshotUtil.schemaFor(table(), name), newContext);

I would leave other metadata tables to other contributors.

Fixes #11701

@szehon-ho
Copy link
Collaborator

This makes sense to me. How about other metadata tables? @dramaticlly do you also want take a look?

@szehon-ho
Copy link
Collaborator

Is it ready for review?

@dramaticlly
Copy link
Contributor

This makes sense to me. How about other metadata tables? @dramaticlly do you also want take a look?

Happy to help with other metadata tables experienced similar problem if it's not addressed in this PR

Copy link

This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@iceberg.apache.org list. Thank you for your contributions.

Copy link

This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@iceberg.apache.org list. Thank you for your contributions.

@github-actions github-actions bot added the stale label Feb 17, 2025
@szehon-ho
Copy link
Collaborator

@ebyhr can you mark as non-draft if its ready to review?

@ebyhr ebyhr marked this pull request as ready for review February 17, 2025 07:58
@ebyhr
Copy link
Contributor Author

ebyhr commented Feb 17, 2025

Changed to non-draft status. Let me leave other metadata tables to @dramaticlly or other contributors.

@szehon-ho
Copy link
Collaborator

Thanks! @dramaticlly can you review as well?

@@ -671,6 +671,76 @@ public void testFilesTableTimeTravelWithSchemaEvolution() throws Exception {
.hasSameSizeAs(expectedFiles);
}

@TestTemplate
public void testFilesTableVersionAsOfTag() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like this test will pass even without the change in this PR. But the next AsOfBranch will fail

Copy link
Contributor Author

@ebyhr ebyhr Mar 21, 2025

Choose a reason for hiding this comment

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

Yes, do you want to remove this test or separate a PR?

@@ -51,6 +52,20 @@ public static class FilesTableScan extends BaseFilesTableScan {
super(table, schema, MetadataTableType.FILES, context);
}

@Override
public TableScan useRef(String name) {
Copy link
Contributor

@dramaticlly dramaticlly Feb 17, 2025

Choose a reason for hiding this comment

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

I think in order to support other metadata tables which also have different schema than its base table schema, we might just pull this up from FilesTableScan to BaseMetadataTableScan instead. So it will works with .partitions and .entries etc. Also I think BaseAllMetadataTableScan overrides this useRef method as well

@github-actions github-actions bot removed the stale label Feb 18, 2025
Copy link

This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@iceberg.apache.org list. Thank you for your contributions.

@github-actions github-actions bot added stale and removed stale labels Mar 20, 2025
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.

Failed to get files metadata from specified branch
3 participants