jonahgao commented on code in PR #8840:
URL: https://github.com/apache/arrow-datafusion/pull/8840#discussion_r1467401460
##########
datafusion/core/src/physical_optimizer/projection_pushdown.rs:
##########
@@ -832,16 +834,22 @@ fn all_alias_free_columns(exprs: &[(Arc<dyn
PhysicalExpr>, String)]) -> bool {
fn new_projections_for_columns(
projection: &ProjectionExec,
source: &Option<Vec<usize>>,
-) -> Vec<usize> {
- projection
- .expr()
- .iter()
- .filter_map(|(expr, _)| {
- expr.as_any()
- .downcast_ref::<Column>()
- .and_then(|expr| source.as_ref().map(|proj|
proj[expr.index()]))
- })
- .collect()
+) -> Option<Vec<usize>> {
+ if source.is_none() {
Review Comment:
I filed issue #9004, and I think PR #9005 should be able to fix the
ProjectionPushdown bug.
There might be another issue here, which is why no projection was pushed
down to the CSV table, but I think it will not affect the functionality.
--
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]