leoyvens opened a new issue, #19272: URL: https://github.com/apache/datafusion/issues/19272
### Describe the bug This is about the `TreeNode` impl for `LogicalPlan`. Some `LogicalPlan::TableScan` are not actually leaves because they are defined by a logical plan. However here: https://github.com/apache/datafusion/blob/321401ce627c586703f3b8902831bbe4578c5a9b/datafusion/expr/src/logical_plan/tree_node.rs#L348-L349 The `fn map_children` is unconditionally assuming that the table scan is a leaf and has no children. The correct behaviour would be to recurse into the plan, if one exists, with `.map_elements`. ### To Reproduce _No response_ ### Expected behavior _No response_ ### Additional context _No response_ -- 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]
