Description
Creating a union throws an AssertionError when a common row type cannot be computed. e.g. (modified RelBuilderTest.testUnion()):
builder.scan("DEPT") .project(builder.field("DEPTNO")) .scan("EMP") .project(builder.field("EMPNO"), builder.field("SAL")) .union(true)
throws:
java.lang.AssertionError: LogicalUnion#4 at org.apache.calcite.rel.AbstractRelNode.getRowType(AbstractRelNode.java:220) at org.apache.calcite.tools.RelBuilder$Frame.<init>(RelBuilder.java:1623) at org.apache.calcite.tools.RelBuilder$Frame.<init>(RelBuilder.java:1606) at org.apache.calcite.tools.RelBuilder.push(RelBuilder.java:220) at org.apache.calcite.tools.RelBuilder.setOp(RelBuilder.java:1032) at org.apache.calcite.tools.RelBuilder.union(RelBuilder.java:1052) at org.apache.calcite.tools.RelBuilder.union(RelBuilder.java:1042) at org.apache.calcite.test.RelBuilderTest.testUnion(RelBuilderTest.java:719)
Attachments
Issue Links
- links to