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.