berkaysynnada commented on code in PR #9096: URL: https://github.com/apache/arrow-datafusion/pull/9096#discussion_r1474482665
########## datafusion/core/src/physical_optimizer/projection_pushdown.rs: ########## @@ -1407,29 +1409,29 @@ mod tests { None, )), Arc::new(CaseExpr::try_new( - Some(Arc::new(Column::new("d", 2))), + Some(Arc::new(Column::new("d", 3))), vec![ ( - Arc::new(Column::new("a", 3)) as Arc<dyn PhysicalExpr>, + Arc::new(Column::new("a", 0)) as Arc<dyn PhysicalExpr>, Arc::new(BinaryExpr::new( - Arc::new(Column::new("d", 2)), + Arc::new(Column::new("d", 3)), Operator::Plus, - Arc::new(Column::new("e", 5)), + Arc::new(Column::new("e", 4)), )) as Arc<dyn PhysicalExpr>, ), ( - Arc::new(Column::new("a", 3)) as Arc<dyn PhysicalExpr>, + Arc::new(Column::new("a", 0)) as Arc<dyn PhysicalExpr>, Arc::new(BinaryExpr::new( - Arc::new(Column::new("e", 5)), + Arc::new(Column::new("e", 4)), Operator::Plus, - Arc::new(Column::new("d", 2)), + Arc::new(Column::new("d", 3)), )) as Arc<dyn PhysicalExpr>, ), ], Some(Arc::new(BinaryExpr::new( - Arc::new(Column::new("a", 3)), + Arc::new(Column::new("a", 0)), Operator::Modulo, - Arc::new(Column::new("e", 5)), + Arc::new(Column::new("e", 4)), ))), )?), ]; Review Comment: Rather than changing this test like that, ```suggestion let projected_exprs: Vec<(Arc<dyn PhysicalExpr>, String)> = vec![ (Arc::new(Column::new("a", 3)), "a".to_owned()), (Arc::new(Column::new("b", 1)), "b_new".to_owned()), (Arc::new(Column::new("c", 0)), "c".to_owned()), (Arc::new(Column::new("d", 2)), "d_new".to_owned()), (Arc::new(Column::new("e", 5)), "e".to_owned()), (Arc::new(Column::new("f", 4)), "f_new".to_owned()), ]; ``` these changes will be simpler and greater coverage -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org