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:
|
// plans without inputs |
|
LogicalPlan::TableScan { .. } |
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.
Describe the bug
This is about the
TreeNodeimpl forLogicalPlan. SomeLogicalPlan::TableScanare not actually leaves because they are defined by a logical plan. However here:datafusion/datafusion/expr/src/logical_plan/tree_node.rs
Lines 348 to 349 in 321401c
The
fn map_childrenis 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.