Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-1522

RelBuilder.union() hits assertion when arguments can't have a common row type

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.11.0
    • Component/s: core
    • Labels:

      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

          Activity

            People

            • Assignee:
              julianhyde Julian Hyde
              Reporter:
              jbalint@gmail.com Jess Balint

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment