dongjoon-hyun commented on a change in pull request #29089:
URL: https://github.com/apache/spark/pull/29089#discussion_r456524842
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala
##########
@@ -969,11 +969,11 @@ object CombineFilters extends Rule[LogicalPlan] with
PredicateHelper {
* Removes Sort operation. This can happen:
* 1) if the sort order is empty or the sort order does not have any reference
* 2) if the child is already sorted
- * 3) if there is another Sort operator separated by 0...n Project/Filter
operators
- * 4) if the Sort operator is within Join separated by 0...n Project/Filter
operators only,
- * and the Join conditions is deterministic
- * 5) if the Sort operator is within GroupBy separated by 0...n Project/Filter
operators only,
- * and the aggregate function is order irrelevant
+ * 3) if there is another Sort operator separated by 0...n
Project/Filter/Repartition operators
+ * 4) if the Sort operator is within Join separated by 0...n
Project/Filter/Repartition
+ * operators only, and the Join conditions is deterministic
+ * 5) if the Sort operator is within GroupBy separated by 0...n
Project/Filter/Repartition
+ * operators only, and the aggregate function is order irrelevant
Review comment:
This documentation update seems to focus on `case _: Repartition =>
true` only. Could you revise more to cover `case r: RepartitionByExpression =>
r.partitionExpressions.forall(_.deterministic)`, please?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]