[ 
https://issues.apache.org/jira/browse/CALCITE-4160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17172782#comment-17172782
 ] 

Jiatao Tao commented on CALCITE-4160:
-------------------------------------

[~julianhyde], [~zabetak]

SQL: val sql = "select * from (select id from t1 order by name)"

Spark:

!image-2020-08-07-10-44-15-158.png|width=329,height=501!

 

Presto:

!image-2020-08-07-10-48-59-599.png|width=368,height=584!

> Add configuration to retain ORDER BY in sub-query
> -------------------------------------------------
>
>                 Key: CALCITE-4160
>                 URL: https://issues.apache.org/jira/browse/CALCITE-4160
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>            Reporter: Jiatao Tao
>            Assignee: Jiatao Tao
>            Priority: Minor
>         Attachments: image-2020-08-07-10-44-15-158.png, 
> image-2020-08-07-10-46-09-716.png, image-2020-08-07-10-46-12-448.png, 
> image-2020-08-07-10-46-13-862.png, image-2020-08-07-10-48-45-382.png, 
> image-2020-08-07-10-48-54-647.png, image-2020-08-07-10-48-55-088.png, 
> image-2020-08-07-10-48-55-648.png, image-2020-08-07-10-48-56-163.png, 
> image-2020-08-07-10-48-59-599.png
>
>
> Pre discussion see in 
> https://issues.apache.org/jira/browse/CALCITE-2798
> https://issues.apache.org/jira/browse/CALCITE-3664
> IMO, we should at least provide a configuration about this. People use 
> Calcite most for its optimizer, and this info users may care, How it executed 
> is by the engine, but users should know this in the plan.
>  



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

Reply via email to