Hi, community. I encounter a problem when I try RelFieldTrimmer.
I run the following SQL in SqlToRelConverterTest:
select ename as did from emp where ename='a' limit 10
I get planA without RelFieldTrimmer:
LogicalSort(fetch=[10])
LogicalProject(DID=[$1])
LogicalFilter(condition=[=($1, 'a')])
LogicalTableScan(table=[[CATALOG, SALES, EMP]])
I get planB with the RelFieldTrimmer:
LogicalSort(fetch=[10])
LogicalFilter(condition=[=($0, 'a')])
LogicalProject(ENAME=[$1])
LogicalTableScan(table=[[CATALOG, SALES, EMP]])
However, the column alia DID for ENAME is missing in planB. And I think the
project should be LogicalProject(DID=[$1]) in planB.
Do I miss some relevant rules in Calcite or is it a issue we need to fix?
Best,
ZheHu