shifluxxc commented on code in PR #19282:
URL: https://github.com/apache/datafusion/pull/19282#discussion_r2612910175
##########
datafusion/expr/src/logical_plan/tree_node.rs:
##########
@@ -346,8 +388,30 @@ impl TreeNode for LogicalPlan {
}
.update_data(LogicalPlan::Statement),
// plans without inputs
- LogicalPlan::TableScan { .. }
- | LogicalPlan::EmptyRelation { .. }
+ LogicalPlan::TableScan(scan) => {
+ if let Some(inner_cow) = scan.source.get_logical_plan() {
+ let inner_plan_owned = inner_cow.into_owned();
+
+ inner_plan_owned.map_elements(f)?.update_data(|new_inner| {
+ let new_source = Arc::new(TableSourceWithPlan {
+ inner: Arc::clone(&scan.source),
+ logical_plan: new_inner,
+ })
+ as Arc<dyn TableSource>;
Review Comment:
> nit: This could be on the previous line. Does `cargo fmt` put it on a new
line ?
Yes
--
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]