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

    https://github.com/apache/flink/pull/1585#discussion_r51993309
  
    --- Diff: 
flink-scala/src/main/scala/org/apache/flink/api/scala/PartitionSortedDataSet.scala
 ---
    @@ -35,16 +37,30 @@ class PartitionSortedDataSet[T: ClassTag](set: 
SortPartitionOperator[T])
        * Appends the given field and order to the sort-partition operator.
        */
       override def sortPartition(field: Int, order: Order): DataSet[T] = {
    +    if (set.useKeySelector()) {
    +      throw new InvalidProgramException("Expression keys cannot be 
appended after selector " +
    +        "function keys")
    +    }
    +
         this.set.sortPartition(field, order)
         this
       }
     
    -/**
    - * Appends the given field and order to the sort-partition operator.
    - */
    +  /**
    +   * Appends the given field and order to the sort-partition operator.
    +   */
       override def sortPartition(field: String, order: Order): DataSet[T] = {
    +    if (set.useKeySelector()) {
    +      throw new InvalidProgramException("Expression keys cannot be 
appended after selector " +
    +        "function keys")
    +    }
    +
         this.set.sortPartition(field, order)
         this
       }
     
    +  override def sortPartition[K: TypeInformation](fun: T => K, order: 
Order): DataSet[T] = {
    --- End diff --
    
    remove method.


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to