You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (JIRA)" <ji...@apache.org> on 2017/01/04 20:05:58 UTC
[jira] [Commented] (CALCITE-1544) AggregateJoinTransposeRule fails
to preserve row type
[ https://issues.apache.org/jira/browse/CALCITE-1544?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15799191#comment-15799191 ]
Julian Hyde commented on CALCITE-1544:
--------------------------------------
Looks good; I have merged to my master branch and will push to Apache master after 1.11 is released.
> AggregateJoinTransposeRule fails to preserve row type
> -----------------------------------------------------
>
> Key: CALCITE-1544
> URL: https://issues.apache.org/jira/browse/CALCITE-1544
> Project: Calcite
> Issue Type: Bug
> Reporter: Kurt Young
> Assignee: Julian Hyde
> Fix For: 1.12.0
>
>
> Here is the sql to reproduce the failure:
> {code}
> select e.deptno
> from sales.emp as e join sales.dept as d on e.deptno = d.deptno
> group by e.deptno
> {code}
> After push the aggregator past join, the RowType seems been changed, and gives the following error:
> {noformat}
> 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)
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)