[ 
https://issues.apache.org/jira/browse/CALCITE-1544?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15759828#comment-15759828
 ] 

Kurt Young commented on CALCITE-1544:
-------------------------------------

Hi [~julianhyde], i can reproduce by adding a test case to RelOptRulesTest

{code}
  @Test public void testPushAggregateThroughJoin() throws Exception {
    final HepProgram preProgram = new HepProgramBuilder()
            .addRuleInstance(AggregateProjectMergeRule.INSTANCE)
            .build();
    final HepProgram program = new HepProgramBuilder()
            .addRuleInstance(AggregateJoinTransposeRule.EXTENDED)
            .build();
    final String sql = "select e.deptno\n"
            + "from sales.emp as e join sales.dept as d on e.deptno = 
d.deptno\n"
            + "group by e.deptno";
    checkPlanning(tester, preProgram, new HepPlanner(program), sql);
  }
{code}

Can you try this again?

> AggregateJoinTransposeRule transform failed
> -------------------------------------------
>
>                 Key: CALCITE-1544
>                 URL: https://issues.apache.org/jira/browse/CALCITE-1544
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Kurt Young
>            Assignee: Julian Hyde
>
> 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.



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

Reply via email to