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

    https://github.com/apache/flink/pull/1848#discussion_r60071991
  
    --- Diff: 
flink-java/src/main/java/org/apache/flink/api/java/operators/PartitionOperator.java
 ---
    @@ -98,6 +102,23 @@ public PartitionOperator(DataSet<T> input, Keys<T> 
pKeys, Partitioner<?> customP
                this.customPartitioner = customPartitioner;
                this.distribution = distribution;
        }
    +
    +   /**
    +    * Sets the order of keys for range partitioning.
    +    * NOTE: Only valid for {@link PartitionMethod.RANGE}.
    +    *
    +    * @param orders array of orders for each specified partition key
    +    * @return The partitioneOperator with properly set orders for given 
keys
    +     */
    +   @PublicEvolving
    +   public PartitionOperator<T> withOrders(Order... orders) {
    +           Preconditions.checkState(pMethod == PartitionMethod.RANGE, 
"Orders cannot be applied for %s partition " +
    +                           "method", pMethod);
    +           
Preconditions.checkArgument(pKeys.getOriginalKeyFieldTypes().length == 
orders.length);
    --- End diff --
    
    Can you add a descriptive error message here?


---
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