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

Timo Walther commented on FLINK-2946:
-------------------------------------

I would like to start working on this issue. But i'm not sure how we want to 
translate a SQL {{ORDER BY}}.

Now we have range partitioning but I think for a simple {{ORDER BY}} we should 
still use {{sortPartition()}} with parallism 1 because I think the user expects 
to have a total order on with he also can apply offsets and limits. Should we 
add additional methods similar to those from Hive ({{sortBy()}}, 
{{distributeBy()}})? If we do so, Calcite does not support those operation in 
its SQL parser and logical nodes.

> Add orderBy() to Table API
> --------------------------
>
>                 Key: FLINK-2946
>                 URL: https://issues.apache.org/jira/browse/FLINK-2946
>             Project: Flink
>          Issue Type: New Feature
>          Components: Table API
>            Reporter: Timo Walther
>            Assignee: Timo Walther
>
> In order to implement a FLINK-2099 prototype that uses the Table APIs code 
> generation facilities, the Table API needs a sorting feature.
> I would implement it the next days. Ideas how to implement such a sorting 
> feature are very welcome. Is there any more efficient way instead of 
> {{.sortPartition(...).setParallism(1)}}? Is it better to sort locally on the 
> nodes first and finally sort on one node afterwards?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to