zhangbutao commented on code in PR #6380:
URL: https://github.com/apache/hive/pull/6380#discussion_r3189623643
##########
ql/src/java/org/apache/hadoop/hive/ql/optimizer/ppr/PartitionPruner.java:
##########
@@ -184,8 +184,11 @@ public static PrunedPartitionList prune(Table tab,
ExprNodeDesc prunerExpr,
String key = tab.getFullyQualifiedName() + ";";
if (tab.getMetaTable() != null) {
key = tab.getFullyQualifiedName() + "." + tab.getMetaTable() + ";";
- } else if (tab.getSnapshotRef() != null) {
- key = tab.getFullyQualifiedName() + "." + tab.getSnapshotRef() + ";";
+ } else if (tab.isNonNative()) {
+ long snapshotId = tab.getStorageHandler().getSnapshotId(tab);
+ if (snapshotId > 0) {
+ key = tab.getFullyQualifiedName() + "." + snapshotId + ";";
Review Comment:
Let me rephrase this. If a branch (test_branch) and a tag (test_tag) are
both created from main at the same time, then their snapshot IDs will be the
same, and the key will be the same (`key = tab.getFullyQualifiedName() + "." +
snapshotId + ";`").
If data is written to test_branch later, then test_branch's current snapshot
ID and test_tag's snapshot ID will become different. And the keys will be the
different.
Is that correct?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]