LuciferYang commented on a change in pull request #29360:
URL: https://github.com/apache/spark/pull/29360#discussion_r474739747
##########
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:
maybe we don't need this intermediate variable `val expands`
----------------------------------------------------------------
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]