You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Shuyi Chen (JIRA)" <ji...@apache.org> on 2018/03/22 08:27:00 UTC

[jira] [Created] (CALCITE-2221) RelRoot.project does not take into account flattened record type

Shuyi Chen created CALCITE-2221:
-----------------------------------

             Summary: RelRoot.project does not take into account flattened record type
                 Key: CALCITE-2221
                 URL: https://issues.apache.org/jira/browse/CALCITE-2221
             Project: Calcite
          Issue Type: Task
          Components: core
            Reporter: Shuyi Chen
            Assignee: Julian Hyde


To reproduce, simply run:

  @Test public void testFlattenRecords() {
    sql("select employees[1] from dept_nested").ok();
  }

It will yield:

LogicalProject(EXPR$0=[$0])
  LogicalProject(EXPR$0$0=[ITEM($6, 1).EMPNO], EXPR$0$1=[ITEM($6, 1).ENAME], EXPR$0$2=[ITEM($6, 1).DETAIL])
    LogicalProject(DEPTNO=[$0], NAME=[$1], TYPE=[$2.TYPE], DESC=[$2.DESC], A=[$2.OTHERS.A], B=[$2.OTHERS.B], EMPLOYEES=[$3])
      LogicalTableScan(table=[[CATALOG, SALES, DEPT_NESTED]])



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)