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] Manifest and Statistic support query by tag name #4291

Merged
merged 4 commits into from
Oct 9, 2024

Conversation

xuzifu666
Copy link
Member

Purpose

Linked issue: close #xxx
Follow up #1667 and #4251
which can only support query by snapshot id, this pr is aimed to support tag name query.

Tests

API and Format

Documentation

@xuzifu666 xuzifu666 changed the title Support scan tag [core] Manifest and Statistic support query by tag name Oct 8, 2024
@xuzifu666 xuzifu666 closed this Oct 8, 2024
@xuzifu666 xuzifu666 reopened this Oct 8, 2024
@@ -170,8 +171,15 @@ public Identifier identifier() {
public Optional<Statistics> statistics() {
Snapshot latestSnapshot;
Long snapshotId = coreOptions().scanSnapshotId();
String tagName = coreOptions().scanTagName();

Copy link
Contributor

Choose a reason for hiding this comment

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

Here add a check, if both snapshotId and tagName are not null, then there is ambiguity here.

Copy link
Member Author

@xuzifu666 xuzifu666 Oct 9, 2024

Choose a reason for hiding this comment

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

Not need worry about both set snapshot-id and tag-name,schema check would guard for it, user can only set one of snapshot-id and tag-name. @wwj6591812

@@ -211,7 +213,11 @@ private static List<ManifestFileMeta> allManifests(FileStoreTable dataTable) {
}
snapshot = snapshotManager.snapshot(snapshotId);
} else if (snapshotId == null) {
Copy link
Contributor

Choose a reason for hiding this comment

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

here, Condition 'snapshotId == null' is always 'true'

Copy link
Member Author

Choose a reason for hiding this comment

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

yes ,change to else

@@ -198,6 +199,7 @@ private static List<ManifestFileMeta> allManifests(FileStoreTable dataTable) {
CoreOptions coreOptions = CoreOptions.fromMap(dataTable.options());
SnapshotManager snapshotManager = dataTable.snapshotManager();
Long snapshotId = coreOptions.scanSnapshotId();
String tagName = coreOptions.scanTagName();
Copy link
Contributor

Choose a reason for hiding this comment

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

Here add a check, if both snapshotId and tagName are not null, then there is ambiguity here.

Copy link
Member Author

@xuzifu666 xuzifu666 Oct 9, 2024

Choose a reason for hiding this comment

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

the same with upper.

@LinMingQiang
Copy link
Contributor

+1

1 similar comment
@wwj6591812
Copy link
Contributor

+1

Copy link
Contributor

@JingsongLi JingsongLi left a comment

Choose a reason for hiding this comment

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

+1

@JingsongLi JingsongLi merged commit be29043 into apache:master Oct 9, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants