Github user dongjoon-hyun commented on the issue:
https://github.com/apache/spark/pull/16719
The original logic was designed to be safe for changing the caller
bottom-up code,
[here](https://github.com/apache/spark/blob/master/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Expression.scala#L154-L157).
```scala
lazy val canonicalized: Expression = {
val canonicalizedChildren = children.map(_.canonicalized)
Canonicalize.execute(withNewChildren(canonicalizedChildren))
}
```
But, I agree that it's safe to simplify that with the new @lw-lin 's test
cases.
For the `assert` statements, I think @cloud-fan and @gatorsmile can give
more insightful advice.
For me, LGTM except that.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]