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

    https://github.com/apache/spark/pull/19281#discussion_r140381057
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/SortOrder.scala
 ---
    @@ -96,6 +96,24 @@ object SortOrder {
          sameOrderExpressions: Set[Expression] = Set.empty): SortOrder = {
         new SortOrder(child, direction, direction.defaultNullOrdering, 
sameOrderExpressions)
       }
    +
    +  /**
    +   * Returns if a sequence of SortOrder satisfies another sequence of 
SortOrder.
    +   *
    +   * SortOrder sequence A satisfies SortOrder sequence B if and only if B 
is an equivalent of A
    +   * or of A's prefix.
    +   */
    +  def orderingSatisfies(seq1: Seq[SortOrder], seq2: Seq[SortOrder]): 
Boolean = {
    --- End diff --
    
    I had originally named them "actualOrdering" and "requiredOrdering" in 
SparkPlan, but since I've moved the function here to SortOrder, thought the 
names should be more general.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to