You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by "Wang Weidong (Jira)" <ji...@apache.org> on 2019/10/31 12:04:00 UTC

[jira] [Created] (CALCITE-3466) JDBC adapter dropped group by statement in subquery

Wang Weidong created CALCITE-3466:
-------------------------------------

             Summary: JDBC adapter dropped group by statement in subquery
                 Key: CALCITE-3466
                 URL: https://issues.apache.org/jira/browse/CALCITE-3466
             Project: Calcite
          Issue Type: Bug
          Components: core
    Affects Versions: 1.21.0, 1.22.0
            Reporter: Wang Weidong
             Fix For: 1.22.0


While convert RelNode to SqlNode, the "group by" statement in subquery was dropped unexpectedly. For example,
original sql is:
_select a, avg(c1) from (select a,sum(d),b as c1 from t_testProjectMerge group by b,a) as t group by a_
RelNode converted by SqlNode is 
_LogicalAggregate(group=[{0}], EXPR$1=[AVG($1)])
  LogicalProject(A=[$1], C1=[$0])
    LogicalAggregate(group=[{0, 1}], EXPR$1=[SUM($2)])
      LogicalProject(B=[$1], A=[$0], D=[$3])
        EnumerableTableScan(table=[[T_TESTPROJECTMERGE]])
_



--
This message was sent by Atlassian Jira
(v8.3.4#803005)