flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-1664) Forbid sorting on POJOs
Date Fri, 03 Apr 2015 09:15:52 GMT

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

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

Github user fhueske commented on a diff in the pull request:

    https://github.com/apache/flink/pull/541#discussion_r27721821
  
    --- Diff: flink-java/src/main/java/org/apache/flink/api/java/operators/DataSink.java ---
    @@ -208,6 +214,28 @@ public DataSink(DataSet<T> data, OutputFormat<T> format,
TypeInformation<T> type
     		return this;
     	}
     
    +	private void isValidSortKeyType(int field) {
    --- End diff --
    
    I agree, there is some duplicated code for key handling, not only for sort keys. 
    I am planning to rework the expression key handling in the API to make it more consistent
as of FLINK-1666 soon.


> Forbid sorting on POJOs
> -----------------------
>
>                 Key: FLINK-1664
>                 URL: https://issues.apache.org/jira/browse/FLINK-1664
>             Project: Flink
>          Issue Type: Bug
>          Components: JobManager
>    Affects Versions: 0.8.0, 0.9
>            Reporter: Fabian Hueske
>            Assignee: Fabian Hueske
>
> Flink's groupSort, partitionSort, and outputSort operators allow to sort partitions or
groups of a DataSet.
> If the sort is defined on a POJO field, the sort order is not well defined. Internally,
the POJO is recursively decomposed into atomic fields (primitives or generic types) and sorted
by sorting these atomic fields. Thereby, the order of these atomic fields is not well defined
(I believe it is lexicographic order of the POJO's member names).
> IMO, the best approach is to forbid sorting on POJO types for now. Instead, it is always
possible to select the nested fields of the POJO that should be used for sorting. Later we
can relax this restriction.



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

Mime
View raw message