jackwener commented on code in PR #4465:
URL: https://github.com/apache/arrow-datafusion/pull/4465#discussion_r1118087230


##########
datafusion/optimizer/src/push_down_projection.rs:
##########
@@ -710,12 +679,11 @@ mod tests {
         let expected = "Projection: test.a, test.c, test.b\
         \n  Filter: test.a > Int32(1)\
         \n    Filter: test.b > Int32(1)\
-        \n      Filter: test.c > Int32(1)\
-        \n        TableScan: test projection=[a, b, c]";
-
-        assert_optimized_plan_eq(&plan, expected);
-
-        Ok(())
+        \n      Projection: test.c, test.a, test.b\

Review Comment:
   Thank you @alamb . Agree with it.
   But In this example, the schema of the projection' !=  the schema of its 
child, because the order already changed. 
   In the future, we indeed remove these projection (if it just change order, 
and it isn't in the top of plan tree, which means that there must be a plannode 
above this projection that can determine the output schema like agg, other 
projection ....) 



-- 
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]

Reply via email to