Github user cloud-fan commented on the issue:
https://github.com/apache/spark/pull/21932
@rxin there are different patterns
1. only match a node if its children are resolved. This is the most common
pattern and we should transform up.
2. match a specific node without checking if children are resolved. This
pattern doesn't care about transform direction.
3. match a group of nodes, like `case Filter(cond, Aggregate(...))`. This
pattern needs transform down.
It's a little confusing to only have `resolveOperators` and
`resolveOperatorsDown`, especially we change some rules from `transform` to
`resolveOperatorsDown`. It took me a while to think about why we specify the
down direction for these rules, then I realized `TreeNode.transform` calls
`transformDown` and we want to keep the previous transform direction.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]