You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "godfrey he (JIRA)" <ji...@apache.org> on 2018/11/29 11:44:00 UTC

[jira] [Updated] (CALCITE-2718) field names are unexpected after ProjectRemoveRule applied

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

godfrey he updated CALCITE-2718:
--------------------------------
    Description: 
{code:java}
@Test public void testProjectRemove() {
    final String sql = "select name as n from (select name from dept) t";
    sql(sql).withRule(ProjectRemoveRule.INSTANCE).check();
  }
{code}

currently, the result plan is: 

{panel:title=plan}
LogicalProject(NAME=[$1])
  LogicalTableScan(table=[[CATALOG, SALES, DEPT]])
{panel}

the filed name of LogicalProject should be `N` instead of `NAME`

  was:

{code:java}
@Test public void testProjectRemove() {
    final String sql = "select name as n from (select name from dept) t";
    sql(sql).withRule(ProjectRemoveRule.INSTANCE).check();
  }
{code}

currently, the result plan is: 

{panel:title=plan}
LogicalProject(NAME=[$1])
  LogicalTableScan(table=[[CATALOG, SALES, DEPT]])
{panel}

the result filed name should be `N` instead of `NAME`


> field names are unexpected after ProjectRemoveRule applied
> ----------------------------------------------------------
>
>                 Key: CALCITE-2718
>                 URL: https://issues.apache.org/jira/browse/CALCITE-2718
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.17.0
>            Reporter: godfrey he
>            Assignee: Julian Hyde
>            Priority: Major
>             Fix For: 1.18.0
>
>
> {code:java}
> @Test public void testProjectRemove() {
>     final String sql = "select name as n from (select name from dept) t";
>     sql(sql).withRule(ProjectRemoveRule.INSTANCE).check();
>   }
> {code}
> currently, the result plan is: 
> {panel:title=plan}
> LogicalProject(NAME=[$1])
>   LogicalTableScan(table=[[CATALOG, SALES, DEPT]])
> {panel}
> the filed name of LogicalProject should be `N` instead of `NAME`



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