adriangb commented on PR #15566:
URL: https://github.com/apache/datafusion/pull/15566#issuecomment-2809577101

   > @adriangb one point doesn't come to me obvious. I've erased a comment 
saying that "filter predicates reflect the output schema after applying the 
projection", and some tests are written based on that. Is that the case really? 
I'm seeing that in with_projection() API of FilterExec the predicates are kept 
as they are, so they are not updated according to the projection. What am I 
missing?
   
   Yeah I saw that you got rid of `reassign_predicate_columns`. The point is 
that if you have a `FilterExec { projection: [1, 0], predicate: Column { name: 
"b", index: 0 } }` the predicate is referencing the indexes after `FilterExec` 
does it's projection. So if you want to push that predicate down to children 
(e.g. to the scan) you need to invert the projection / match the column with 
the input schema (i.e. `Column { name: "b", index: 1 }`.


-- 
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...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to