[
https://issues.apache.org/jira/browse/CALCITE-4149?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jiatao Tao updated CALCITE-4149:
--------------------------------
Description:
Case like that:
{code:java}
@Test void dev() throws SQLException {
sql("model", "select t1.name as t1_name, t2.name from EMPS t1 join EMPS t2 on
t1.name = t2.name").ok();
}
{code}
The plan after RelFieldTrimmer:
{code:java}
LogicalJoin(condition=[=($0, $1)], joinType=[inner])
LogicalProject(NAME=[$1])
LogicalTableScan(table=[[SALES, EMPS]])
LogicalProject(NAME=[$1])
LogicalTableScan(table=[[SALES, EMPS]])
{code}
was:
Case like that:
{code:java}
@Test void dev() throws SQLException {
sql("model", "select t1.name as t1_name, t2.name from EMPS t1 join EMPS t2 on
t1.name = t2.name").ok();
}
{code}
The plan after RelFieldTrimmer
{code:java}
{code}
> Missing top project when trim fields
> ------------------------------------
>
> Key: CALCITE-4149
> URL: https://issues.apache.org/jira/browse/CALCITE-4149
> Project: Calcite
> Issue Type: Bug
> Components: core
> Reporter: Jiatao Tao
> Assignee: Jiatao Tao
> Priority: Major
>
> Case like that:
>
> {code:java}
> @Test void dev() throws SQLException {
> sql("model", "select t1.name as t1_name, t2.name from EMPS t1 join EMPS t2
> on t1.name = t2.name").ok();
> }
> {code}
>
> The plan after RelFieldTrimmer:
> {code:java}
> LogicalJoin(condition=[=($0, $1)], joinType=[inner])
> LogicalProject(NAME=[$1])
> LogicalTableScan(table=[[SALES, EMPS]])
> LogicalProject(NAME=[$1])
> LogicalTableScan(table=[[SALES, EMPS]])
> {code}
>
>
>
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)