deniskuzZ commented on code in PR #6824:
URL: https://github.com/apache/hive/pull/6824#discussion_r4122000046
##########
ql/src/java/org/apache/hadoop/hive/ql/plan/DynamicPruningEventDesc.java:
##########
@@ -121,14 +117,19 @@ public ExprNodeDesc getPartKey() {
return this.partKey;
}
+ /**
+ * The predicate is left out: it is the part key tested against the dynamic
list its values
+ * arrive in, and that list renders as the operator producing it, so two
events pruning alike
+ * would never compare the same. Where the values come from is the event's
input, which the
+ * caller compares as it does for any other operator.
+ */
@Override
public boolean isSame(OperatorDesc other) {
if (super.isSame(other)) {
DynamicPruningEventDesc otherDesc = (DynamicPruningEventDesc) other;
return Objects.equals(getTargetColumnName(),
otherDesc.getTargetColumnName()) &&
Objects.equals(getTargetColumnType(),
otherDesc.getTargetColumnType()) &&
- Objects.equals(getPartKeyString(), otherDesc.getPartKeyString()) &&
- Objects.equals(getPartPredicateString(),
otherDesc.getPartPredicateString());
+ Objects.equals(getPartKeyString(), otherDesc.getPartKeyString());
Review Comment:
downStreamMerge only runs after a scan-only merge (sr.discardableOps.size()
== 1). An event could be merged away there only if two identical DPP chains sit
below that scan and target different scans with the same partition column and
key expression. Even then, one scan just loses pruning and the result stays
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]