ZheHu created CALCITE-6070:
------------------------------

             Summary: Missing column alia after RelFieldTrimmer
                 Key: CALCITE-6070
                 URL: https://issues.apache.org/jira/browse/CALCITE-6070
             Project: Calcite
          Issue Type: Wish
          Components: core
    Affects Versions: 1.35.0
            Reporter: ZheHu


Run the following SQL in SqlToRelConverterTest:
{code}
select ename as did from emp where ename='a' limit 10
{code}

Got planA without RelFieldTrimmer:
{code}
LogicalSort(fetch=[10])
  LogicalProject(DID=[$1])
    LogicalFilter(condition=[=($1, 'a')])
      LogicalTableScan(table=[[CATALOG, SALES, EMP]])
{code}

Got planB with RelFieldTrimmer:
{code}
LogicalSort(fetch=[10])
  LogicalFilter(condition=[=($0, 'a')])
    LogicalProject(ENAME=[$1])
      LogicalTableScan(table=[[CATALOG, SALES, EMP]])
{code}

However, the column alia DID for ENAME is missing in planB.
Maybe we can do something about the trimmer when we have other 
purposes(renaming column is the only purpose for this case).



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to