Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/17339#discussion_r106873344
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/SortOrder.scala
 ---
    @@ -53,8 +53,15 @@ case object NullsLast extends NullOrdering{
     /**
      * An expression that can be used to sort a tuple.  This class extends 
expression primarily so that
      * transformations over expression will descend into its child.
    + * `sameOrderExpressions` is a set of expressions with the same sort order 
as the child. It is
    + * derived from equivalence relation in an operator, e.g. left/right keys 
of an inner sort merge
    + * join.
      */
    -case class SortOrder(child: Expression, direction: SortDirection, 
nullOrdering: NullOrdering)
    +case class SortOrder(
    +    child: Expression,
    +    direction: SortDirection,
    +    nullOrdering: NullOrdering,
    +    sameOrderExpressions: Set[Expression])
    --- End diff --
    
    Ideally we don't need this, and we can rely on `EqualTo` constraint to 
infer this information. Unfortunately the constraint only exists in logical 
plan, so we can't find a better solution for this case. cc @gatorsmile do you 
have a better idea?


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

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

Reply via email to