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

    https://github.com/apache/flink/pull/1848#discussion_r58895362
  
    --- Diff: 
flink-java/src/main/java/org/apache/flink/api/java/operators/PartitionOperator.java
 ---
    @@ -98,6 +101,14 @@ public PartitionOperator(DataSet<T> input, Keys<T> 
pKeys, Partitioner<?> customP
                this.customPartitioner = customPartitioner;
                this.distribution = distribution;
        }
    +
    +   public PartitionOperator<T> withOrders(Order... orders) {
    --- End diff --
    
    We should check that the number of `orders` is the same as the number of 
specified keys. Unfortunately, this is not as trivial as it sounds, because 
`Keys` does not give access to the the originally specified keys but only to 
the flattened logical keys. If a program specifies a `Tuple2<Long, Long>` as 
key, it will only specify a single order but the logical keys will be flattened 
to `[Long, Long]`. I think we should extend the `Keys` class by a method 
`TypeInformation<?>[] getOriginalKeyFieldTypes()` which returns the unflattened 
field types. Using that method we can see how many flat fields exist for each 
specified key field.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to