You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (Jira)" <ji...@apache.org> on 2023/10/24 02:06:00 UTC

[jira] [Updated] (CALCITE-6070) Incorrect field name after RelFieldTrimmer

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

Julian Hyde updated CALCITE-6070:
---------------------------------
    Summary: Incorrect field name after RelFieldTrimmer  (was: Missing column alia after RelFieldTrimmer)

> Incorrect field name 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
>            Priority: Minor
>
> 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)