mustafasrepo commented on code in PR #8707:
URL: https://github.com/apache/arrow-datafusion/pull/8707#discussion_r1439168100
##########
datafusion/expr/src/logical_plan/plan.rs:
##########
@@ -706,17 +670,10 @@ impl LogicalPlan {
}))
}
},
- LogicalPlan::Window(Window {
- window_expr,
- schema,
- ..
- }) => {
+ LogicalPlan::Window(Window { window_expr, .. }) => {
assert_eq!(window_expr.len(), expr.len());
- Ok(LogicalPlan::Window(Window {
- input: Arc::new(inputs[0].clone()),
- window_expr: expr,
- schema: schema.clone(),
- }))
Review Comment:
> This looks like a potential bug. Since input/window_expr will change, we
shouldn't reuse previous schema.
Aggree that, previous version wasn't robust to expression and input changes.
This version is much better. Thanks @viirya for catching this.
##########
datafusion/expr/src/logical_plan/plan.rs:
##########
@@ -706,17 +670,10 @@ impl LogicalPlan {
}))
}
},
- LogicalPlan::Window(Window {
- window_expr,
- schema,
- ..
- }) => {
+ LogicalPlan::Window(Window { window_expr, .. }) => {
assert_eq!(window_expr.len(), expr.len());
- Ok(LogicalPlan::Window(Window {
- input: Arc::new(inputs[0].clone()),
- window_expr: expr,
- schema: schema.clone(),
- }))
Review Comment:
> This looks like a potential bug. Since input/window_expr will change, we
shouldn't reuse previous schema.
Agree that, previous version wasn't robust to expression and input changes.
This version is much better. Thanks @viirya for catching this.
--
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]