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


##########
datafusion/datasource/src/file_scan_config.rs:
##########
@@ -332,7 +350,12 @@ impl FileScanConfigBuilder {
 
     /// Set the columns on which to project the data using column indices.
     ///
-    /// Indexes that are higher than the number of columns of `file_schema` 
refer to `table_partition_cols`.
+    /// This method attempts to push down the projection to the underlying file
+    /// source if supported. If the file source does not support projection
+    /// pushdown, an error is returned.

Review Comment:
   I double checked and I think the comment is correct and this code does 
return an error
   
   ` FileSource::try_pushdown_projection` returns `Option`,  but then this 
method  returns an internal error if the file source returns `None`
   
   A few lines below in this diff:
   
   ```rust
           if let Some(new_source) = new_source {
               self.file_source = new_source;
           } else {
               internal_err!(      // <------------ This error 
                   "FileSource {} does not support projection pushdown",
                   self.file_source.file_type()
               )?;
           }
   ```



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