JoshElkind commented on code in PR #20250:
URL: https://github.com/apache/datafusion/pull/20250#discussion_r2806251036
##########
datafusion-cli/examples/cli-session-context.rs:
##########
@@ -73,8 +73,8 @@ impl CliSessionContext for MyUnionerContext {
&self,
plan: LogicalPlan,
) -> Result<DataFrame, DataFusionError> {
- let new_plan = LogicalPlanBuilder::from(plan.clone())
- .union(plan.clone())?
+ let new_plan = LogicalPlanBuilder::from(Arc::clone(&plan))
Review Comment:
yes, plan here is LogicalPlan, not Arc<LogicalPlan>>, so using
Arc::clone(&plan) was wrong. I reverted that to plan.clone() (and the same for
the second use in the .union(plan.clone())? call).
##########
datafusion-cli/src/main.rs:
##########
@@ -816,7 +819,7 @@ mod tests {
assert_eq!(
2,
- df.clone()
+ Arc::clone(&df)
Review Comment:
same idea as my prev comment...
--
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]