zhangbutao commented on code in PR #6380:
URL: https://github.com/apache/hive/pull/6380#discussion_r3068090580
##########
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:
Why change it here?
In my opinion,
`key = tab.getFullyQualifiedName() + "." + tab.getSnapshotRef() + ";"`
can also represent a unique key.
--
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]