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

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

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

    https://github.com/apache/flink/pull/1566#discussion_r51997124
  
    --- Diff: 
flink-core/src/main/java/org/apache/flink/api/java/typeutils/ObjectArrayTypeInfo.java
 ---
    @@ -72,15 +77,59 @@ public int getTotalFields() {
     
        @Override
        public boolean isKeyType() {
    -           return false;
    +           return true;
        }
     
        @SuppressWarnings("unchecked")
        @Override
        public TypeSerializer<T> createSerializer(ExecutionConfig 
executionConfig) {
                return (TypeSerializer<T>) new GenericArraySerializer<C>(
    -                   componentInfo.getTypeClass(),
    -                   componentInfo.createSerializer(executionConfig));
    +                           componentInfo.getTypeClass(),
    +                           
componentInfo.createSerializer(executionConfig));
    +   }
    +
    +   @SuppressWarnings("unchecked")
    +   private TypeComparator<? super Object> 
getBaseComparatorInfo(TypeInformation<? extends Object> componentInfo, boolean 
sortOrderAscending, ExecutionConfig executionConfig) {
    --- End diff --
    
    Why are you extracting for certain types the element comparator (for 
example the ObjectArrayTypeInfo) and for other you create the `TypeComparator` 
(for example the `CompositeTypeInfo`)? I don't get it. Why do you need the 
`getBaseComparatorInfo` method at all? Simply check in `createComparator` the 
different subtypes and then create the `TypeComparator`. 


> DataSet API does not support multi-dimensional arrays as keys
> -------------------------------------------------------------
>
>                 Key: FLINK-2678
>                 URL: https://issues.apache.org/jira/browse/FLINK-2678
>             Project: Flink
>          Issue Type: Wish
>          Components: DataSet API
>            Reporter: Till Rohrmann
>            Assignee: Subhobrata Dey
>            Priority: Minor
>
> The DataSet API does not support grouping/sorting on field which are 
> multi-dimensional arrays. It could be helpful to also support these types.



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

Reply via email to