korowa commented on code in PR #5261:
URL: https://github.com/apache/arrow-datafusion/pull/5261#discussion_r1105403434


##########
datafusion/optimizer/src/push_down_projection.rs:
##########
@@ -523,13 +523,24 @@ fn push_down_scan(
         }
     }
 
+    // Building new projection from BTreeSet
+    // preserving source projection order if it exists
+    let projection = if let Some(original_projection) = &scan.projection {
+        original_projection

Review Comment:
   After an attempt of writing test for this case I've realized that maybe we 
don't need additional plan validity checks in optimizer rules -- normally plan 
builder won't allow to project/filter/etc on missing column 🤔 



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