Github user adrian-wang commented on a diff in the pull request:

    https://github.com/apache/spark/pull/5208#discussion_r28302364
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/basicOperators.scala ---
    @@ -41,6 +41,15 @@ case class Project(projectList: Seq[NamedExpression], 
child: SparkPlan) extends
         val resuableProjection = buildProjection()
         iter.map(resuableProjection)
       }
    +
    +  /**
    +   * outputOrdering of Project is not always same with child's 
outputOrdering if the certain
    +   * key is pruned, however, if the key is pruned then we must not require 
child using this
    +   * ordering from upper layer, only if the ordering would not be changed 
by a negative, there
    +   * would be a way to keep the ordering.
    +   * TODO: we may utilize this feature later to avoid some unnecessary 
sorting.
    +   */
    +  override def outputOrdering: Option[Ordering[Row]] = None
    --- End diff --
    
    We still need to consider if the projectList contains a `-`, then the 
ordering would be reverted. I think we may do that carefully, probably not in 
this PR.


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