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

Igor Guzenko resolved CALCITE-2221.
-----------------------------------
    Fix Version/s: 1.21.0
       Resolution: Fixed

Fixed in scope of CALCITE-3138. Plan for test case described in the ticket now 
uses ROW constructor function to represent final projected value. 

{code}
LogicalProject(EXPR$0=[ROW(ITEM($3, 1).EMPNO, ITEM($3, 1).ENAME, ROW(ITEM($3, 
1).DETAIL.SKILLS))])
  LogicalTableScan(table=[[CATALOG, SALES, DEPT_NESTED]])
{code}

> 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: Igor Guzenko
>            Priority: Major
>             Fix For: 1.21.0
>
>
> 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($2, 1).EMPNO], EXPR$0$1=[ITEM($2, 1).ENAME], 
> EXPR$0$2=[ITEM($2, 1).DETAIL])
>     LogicalTableScan(table=[[CATALOG, SALES, DEPT_NESTED]])



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

Reply via email to