rgbuilds commented on PR #27423: URL: https://github.com/apache/datafusion/pull/27423#issuecomment-7094651449
@galaxytemple Thanks for checking and confirming! > For comparing the node's own attributes, is there a way to do this just through traversal without constructing a new expression at each step, or is `with_new_children` the only option without adding a new API? As far as I can tell, the current `PhysicalExpr` API doesn’t expose a generic way to compare just a node’s own attributes: traversal gives us the children, while expression equality compares the whole node, including its children. The approach here substitutes the right-hand children into the left expression so that the existing equality implementation can compare the remaining attributes. A dedicated node-attribute comparison method could avoid constructing an expression, but that would require a new API. We could also handle individual expression types explicitly, though that would need updating as expression types change. I’d be interested if anyone knows a better option with the existing API. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
