deniskuzZ commented on code in PR #6380:
URL: https://github.com/apache/hive/pull/6380#discussion_r3068205672


##########
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:
   `tag`/`branch`/`as of` might reference the same snapshot, but ATM all of 
them produce diff keys, isn't it?



-- 
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]

Reply via email to