You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/08/21 14:54:55 UTC
[GitHub] [spark] Karl-WangSK commented on a change in pull request #29360: [SPARK-32542][SQL] Add an optimizer rule to split an Expand into multiple Expands for aggregates
Karl-WangSK commented on a change in pull request #29360:
URL: https://github.com/apache/spark/pull/29360#discussion_r474749994
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala
##########
@@ -1823,3 +1824,32 @@ object OptimizeLimitZero extends Rule[LogicalPlan] {
empty(ll)
}
}
+
+/**
+ * Split [[Expand]] into several Expand if the projection size of Expand is larger
+ * than default projection size.
+ */
+object SplitAggregateWithExpand extends Rule[LogicalPlan] {
+ private def splitExpand(expand: Expand, num: Int): Seq[Expand] = {
+ val groupedProjections = expand.projections.grouped(num).toList
+ val expands: Seq[Expand] = groupedProjections.map {
Review comment:
ok
----------------------------------------------------------------
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org