jinxing64 commented on a change in pull request #1310: [CALCITE-3113] 
Equivalent MutableAggregates with different row types should match with each 
other.
URL: https://github.com/apache/calcite/pull/1310#discussion_r303344050
 
 

 ##########
 File path: core/src/main/java/org/apache/calcite/plan/SubstitutionVisitor.java
 ##########
 @@ -542,14 +556,14 @@ assert equalType(
                     equivalents.remove(slots[i], equi.iterator().next());
                   }
                 }
-                assert result.result.rowType.equals(result.call.query.rowType)
-                    : Pair.of(result.result, result.call.query);
-                equivalents.put(result.result, result.call.query);
+                equivalents.put(result1, result.call.query);
                 if (targetDescendant == target) {
                   // A real substitution happens. We purge the attempted
                   // replacement list and add them into substitution list.
                   // Meanwhile we stop matching the descendants and jump
                   // to the next subtree in pre-order traversal.
+                  assert result1.rowType.equals(result.call.query.rowType)
+                      : Pair.of(result1, result.call.query);
 
 Review comment:
   OK, I will remove 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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to