-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Conversation
@@ -170,8 +171,15 @@ public Identifier identifier() { | |||
public Optional<Statistics> statistics() { | |||
Snapshot latestSnapshot; | |||
Long snapshotId = coreOptions().scanSnapshotId(); | |||
String tagName = coreOptions().scanTagName(); | |||
|
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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'
There was a problem hiding this comment.
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(); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the same with upper.
+1 |
1 similar comment
+1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
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