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

Wang Yanlin reassigned CALCITE-3664:
------------------------------------

    Assignee: Wang Yanlin

> Lost sort in subquery when converting SqlNode to Relnode
> --------------------------------------------------------
>
>                 Key: CALCITE-3664
>                 URL: https://issues.apache.org/jira/browse/CALCITE-3664
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Wang Yanlin
>            Assignee: Wang Yanlin
>            Priority: Major
>
> Lost sort in subquery when converting a SqlNode to Relnode, making its 
> semantics changed.
>  The test case to reproduce
> {code:java}
> // SqlToRelConverterTest
> @Test public void testSortInSubquery() {
>     final String sql = "select ename from (select ename from emp order by 
> ename) a";
>     sql(sql).ok();
>   }
> {code}
> This test case will success with this plan.
> {code:java}
> <TestCase name="testSortInSubquery">
>         <Resource name="sql">
>             <![CDATA[select ename from (select ename from emp order by ename) 
> a]]>
>         </Resource>
>         <Resource name="plan">
>             <![CDATA[
> LogicalProject(ENAME=[$1])
>   LogicalTableScan(table=[[CATALOG, SALES, EMP]])
> ]]>
>         </Resource>
>     </TestCase>
> {code}



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

Reply via email to