feniljain commented on code in PR #18172:
URL: https://github.com/apache/datafusion/pull/18172#discussion_r2446726445


##########
datafusion/datasource-parquet/src/source.rs:
##########
@@ -720,7 +721,9 @@ impl FileSource for ParquetSource {
         let filters: Vec<PushedDownPredicate> = filters
             .into_iter()
             .map(|filter| {
-                if can_expr_be_pushed_down_with_schemas(&filter, &file_schema) 
{
+                if is_dynamic_physical_expr(&filter)
+                    || can_expr_be_pushed_down_with_schemas(&filter, 
&file_schema)

Review Comment:
   So I had included it earlier, but I removed it later with this mental model:
   
   - This function receives filters directly mentioned in query and dynamic 
filters both.
   - For a filter found in a query, if it contains a partition column, it would 
be partition pruned by table provider.
   - The only case where this function would receive a filter expr containing 
partition column, is for dynamic filter
   - That means, we want to lower dynamic filter regardless of any case, so we 
add a check if expr is dynamic expr, we let it lower down
   
   Do correct me if I am misunderstanding anything here :)



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to