Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
Here is the sql to reproduce the failure:
select e.deptno from sales.emp as e join sales.dept as d on e.deptno = d.deptno group by e.deptno
After push the aggregator past join, the RowType seems been changed, and gives the following error:
java.lang.AssertionError: Internal error: Cannot add expression of different type to set: set type is RecordType(INTEGER NOT NULL DEPTNO, INTEGER NOT NULL DEPTNO0) NOT NULL expression type is RecordType(INTEGER NOT NULL DEPTNO, INTEGER NOT NULL DEPTNO0, VARCHAR(10) CHARACTER SET "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary" NOT NULL NAME) NOT NULL set is rel#20:LogicalAggregate(input=HepRelVertex#19,group={7, 9}) expression is LogicalJoin#23 at org.apache.calcite.util.Util.newInternal(Util.java:780) at org.apache.calcite.plan.RelOptUtil.verifyTypeEquivalence(RelOptUtil.java:384) at org.apache.calcite.plan.hep.HepRuleCall.transformTo(HepRuleCall.java:57) at org.apache.calcite.plan.RelOptRuleCall.transformTo(RelOptRuleCall.java:225) at org.apache.calcite.rel.rules.AggregateJoinTransposeRule.onMatch(AggregateJoinTransposeRule.java:342)
Attachments
Issue Links
- links to