wangyum commented on a change in pull request #31908:
URL: https://github.com/apache/spark/pull/31908#discussion_r598285144



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/basicLogicalOperators.scala
##########
@@ -659,6 +659,12 @@ case class Aggregate(
     val nonAgg = 
aggregateExpressions.filter(_.find(_.isInstanceOf[AggregateExpression]).isEmpty)
     getAllValidConstraints(nonAgg)
   }
+
+  // Whether this Aggregate operator is equally the Distinct operator.
+  private[sql] def isEquallyDistinct: Boolean = {

Review comment:
       This method can be used elsewhere. For example:
   
   
https://github.com/apache/spark/blob/e226e2ceea7b648a1864c7ff1ba1e67eee83789b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala#L1809-L1813
 in this pr: https://github.com/apache/spark/pull/31113




-- 
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:
us...@infra.apache.org



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

Reply via email to