jinxing64 opened a new pull request #1310: [CALCITE-3133] Equivalent MutableAggregates with different row types should match with each other. URL: https://github.com/apache/calcite/pull/1310 In current code, below test case fails: ``` @Test public void testAggregate1() { checkMaterialize( "select count(*) as c0 from \"emps\" group by \"empid\"", "select count(*) as c1 from \"emps\" group by \"empid\""); } java.lang.AssertionError at org.apache.calcite.plan.SubstitutionVisitor.go(SubstitutionVisitor.java:504) at org.apache.calcite.plan.SubstitutionVisitor.go(SubstitutionVisitor.java:465) at org.apache.calcite.plan.MaterializedViewSubstitutionVisitor.go(MaterializedViewSubstitutionVisitor.java:56) at org.apache.calcite.plan.RelOptMaterializations.substitute(RelOptMaterializations.java:200) at org.apache.calcite.plan.RelOptMaterializations.useMaterializedViews(RelOptMaterializations.java:72) at org.apache.calcite.plan.volcano.VolcanoPlanner.registerMaterializations(VolcanoPlanner.java:347) ``` The reason is that `MutableRel` self-defined the identity mechanism. Obviously the materialization above should be used. This PR proposes to remove the `assert` and assure that the final replaced from `SubstitutionVisitor` have the same row-type as before.
---------------------------------------------------------------- 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
