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:43:00 UTC

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

godfrey he created CALCITE-2718:
-----------------------------------

             Summary: 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
             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 result filed name should be `N` instead of `NAME`



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