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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]