korowa commented on code in PR #5261:
URL: https://github.com/apache/arrow-datafusion/pull/5261#discussion_r1104521780
##########
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:
True, I guess, in this case we should return error -- I thought this case
could be handled while
[creating](https://github.com/apache/arrow-datafusion/blob/master/datafusion/optimizer/src/push_down_projection.rs#L492)
BTreeSet of projection indices, but it uses `scan.source.schema()` rather than
projected schema.
I'll fix it later today. Thank you!
--
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]