alamb commented on code in PR #20193:
URL: https://github.com/apache/datafusion/pull/20193#discussion_r2775086602


##########
datafusion/datasource/src/file_scan_config.rs:
##########
@@ -793,37 +793,27 @@ impl DataSource for FileScanConfig {
         config: &ConfigOptions,
     ) -> Result<FilterPushdownPropagation<Arc<dyn DataSource>>> {
         // Remap filter Column indices to match the table schema (file + 
partition columns).
-        // This is necessary because filters may have been created against a 
different schema
-        // (e.g., after projection pushdown) and need to be remapped to the 
table schema
-        // before being passed to the file source and ultimately serialized.
-        // For example, the filter being pushed down is `c1_c2 > 5` and it was 
created
-        // against the output schema of the this `DataSource` which has 
projection `c1 + c2 as c1_c2`.
-        // Thus we need to rewrite the filter back to `c1 + c2 > 5` before 
passing it to the file source.
+        // This is necessary because filters refer to the output schema of 
this `DataSource`

Review Comment:
   Clarified that the "different schema" is the "table schema"



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