You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Haisheng Yuan (Jira)" <ji...@apache.org> on 2020/01/28 17:53:01 UTC

[jira] [Resolved] (CALCITE-3738) Missing LogicalSort for Insert statement

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

Haisheng Yuan resolved CALCITE-3738.
------------------------------------
    Fix Version/s: 1.22.0
       Resolution: Fixed

Fixed in https://github.com/apache/calcite/commit/ad3153c24fa97b6193be7ac14e018f2c3112c7ec.

> Missing LogicalSort for Insert statement
> ----------------------------------------
>
>                 Key: CALCITE-3738
>                 URL: https://issues.apache.org/jira/browse/CALCITE-3738
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.19.0
>            Reporter: pengzhiwei
>            Assignee: pengzhiwei
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.22.0
>
>          Time Spent: 2h 10m
>  Remaining Estimate: 0h
>
> The following sql statement generates a wrong logical plan which missing the LogicalSort :
> {code:java}
> insert into t select id*10,name from users order by name;{code}
> the plan is :
> {code:java}
> LogicalTableModify(table=[[t]], operation=[INSERT], flattened=[false])
>   LogicalProject(id=[*($0, 10)], name=[$1])
>     LogicalTableScan(table=[[users]])
> {code}
> 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.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)