Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.19.0
Description
The following sql statement generates a wrong logical plan which missing the LogicalSort :
insert into t select id*10,name from users order by name;
the plan is :
LogicalTableModify(table=[[t]], operation=[INSERT], flattened=[false])
LogicalProject(id=[*($0, 10)], name=[$1])
LogicalTableScan(table=[[users]])
This issue is introduced by the issue https://issues.apache.org/jira/browse/CALCITE-2978
which removes the sort by in sub-query.However the query in insert statement is not a sub-query.
Attachments
Issue Links
- Blocked
-
CALCITE-2978 sorting not applied in subqueries
- Closed
- links to