yahoNanJing commented on PR #8835:
URL:
https://github.com/apache/arrow-datafusion/pull/8835#issuecomment-1894783141
Thanks @peter-toth.
> Probably we all agree that currently Transformed has no point. IMO we
should either remove it or make use of it / fix it.
Yes, I agree it's not used currently.
> I can think of 2 uses of this enum:
Yes, it seems the `OptimizerRule` does not leverage the `TreeNode` very
much. For the long time goal, it would be better to use `TreeNode` to simplify
the logic of `OptimizerRule`.
And you are correct and the current interface may not be correct. How about
changing the interface like this:
```
fn transform_up<F>(self, op: &F) -> Result<Transformed<Self>>
where
F: Fn(Self) -> Result<Self>
```
Then we can leverage the `Transformed` to avoid use
`with_new_children_if_necessary` in some cases.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]