Copilot commented on code in PR #6824:
URL: https://github.com/apache/hive/pull/6824#discussion_r4121360208
##########
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:
`isSame` is also used by `SharedWorkOptimizer.downStreamMerge` through
`cI.logicalEquals(cJ)`, which compares only the event descriptors and does not
compare their input branches. After dropping `predicate` here, two sibling
storage-handler DPP events with the same target metadata/part key but different
pruning predicates can be treated as equal; one event is removed by
`downStreamMerge`, so its predicate is never registered in `MapWork` and one
pruning condition is lost. Keep the general descriptor equality
predicate-sensitive and introduce a narrower comparison for the parent-aware
DPP branch matching instead.
--
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]