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 2021/04/07 23:38:26 UTC

[GitHub] [spark] dbaliafroozeh commented on a change in pull request #32030: [WIP] Improve the performance of mapChildren and withNewChildren methods

dbaliafroozeh commented on a change in pull request #32030:
URL: https://github.com/apache/spark/pull/32030#discussion_r609141398



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/interfaces.scala
##########
@@ -164,6 +164,9 @@ case class AggregateExpression(
       case _ => aggFuncStr
     }
   }
+
+  override protected def withNewChildrenInternal(newChildren: IndexedSeq[Expression]): Expression =
+    super.legacyWithNewChildren(newChildren)

Review comment:
       Fixed it. Probably it makes sense to have a special node with nodes with a child and an optional child. There are a number of some nodes. Manually implementing them is tricky. I'd like to ideally only have to implement this method like this:
   ```
   override protected def withNewChildrenInternal(newChildren: IndexedSeq[Expression]): Expression = 
     copy(children = newChildren)
   ```
   That is, only for nodes with a list of children. We'll do these tweaks in a followup.




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