[ 
https://issues.apache.org/jira/browse/CALCITE-1522?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Julian Hyde resolved CALCITE-1522.
----------------------------------
       Resolution: Fixed
    Fix Version/s: 1.11.0

Fixed in http://git-wip-us.apache.org/repos/asf/calcite/commit/e4d3ad0b. Thanks 
for the PR, [[email protected]]!

> RelBuilder.union() hits assertion when arguments can't have a common row type
> -----------------------------------------------------------------------------
>
>                 Key: CALCITE-1522
>                 URL: https://issues.apache.org/jira/browse/CALCITE-1522
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>            Reporter: Jess Balint
>            Assignee: Julian Hyde
>            Priority: Minor
>              Labels: union
>             Fix For: 1.11.0
>
>
> Creating a union throws an AssertionError when a common row type cannot be 
> computed. e.g. (modified {{RelBuilderTest.testUnion()}}):
> {code}
>         builder.scan("DEPT")
>             .project(builder.field("DEPTNO"))
>             .scan("EMP")
>             .project(builder.field("EMPNO"), builder.field("SAL"))
>             .union(true)
> {code}
> throws:
> {noformat}
> 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)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to