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

ASF GitHub Bot commented on FLINK-3234:
---------------------------------------

Github user chiwanpark commented on the pull request:

    https://github.com/apache/flink/pull/1585#issuecomment-180224231
  
    @fhueske I addressed your comments.
    
    To reduce modifying original code, I added some variables for key selector 
only. But this make the source code quite messy. I would like to refactor 
`SortPartitionOperator` like following:
    
    * Preserve key informations and sort orders as `List<Keys>` and 
`List<Order>` object.
      * We have to create a list because users can chain expression keys.
    * Check whether given field is sortable or not in constructors and 
`sortPartition` method in `SortPartitionOperator`
    * Remove `sortKeyPositions`, `sortOrders`, `getFlatFields` and 
`appendSorting`
    * When `translateToDataFlow` method is called, the method fetches key 
positions from preserved key objects and creates operators.
    
    Does this make sense?


> SortPartition does not support KeySelectorFunctions
> ---------------------------------------------------
>
>                 Key: FLINK-3234
>                 URL: https://issues.apache.org/jira/browse/FLINK-3234
>             Project: Flink
>          Issue Type: Improvement
>          Components: DataSet API
>    Affects Versions: 1.0.0, 0.10.1
>            Reporter: Fabian Hueske
>            Assignee: Chiwan Park
>             Fix For: 1.0.0
>
>
> The following is not supported by the DataSet API:
> {code}
> DataSet<MyObject> data = ...
> DataSet<MyObject> data.sortPartition(
>   new KeySelector<MyObject, Long>() {
>     public Long getKey(MyObject v) {
>       ...
>     }
>   }, 
>   Order.ASCENDING);
> {code}



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

Reply via email to