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


##########
docs/source/library-user-guide/upgrading.md:
##########
@@ -129,6 +129,20 @@ if let Some(datasource_exec) = 
plan.as_any().downcast_ref::<DataSourceExec>() {
 # */
 ```
 
+There's also a more convenient helper method `downcast_to_file_source` on 
`DataSourceExec`

Review Comment:
   This code will not be available until DataFusion 47, so we probably need to 
put this into a new heading for 47 upgrade guide



##########
datafusion/datasource/src/source.rs:
##########
@@ -230,4 +231,18 @@ impl DataSourceExec {
             Boundedness::Bounded,
         )
     }
+
+    /// Downcast the `DataSourceExec` to a specific file source

Review Comment:
   ```suggestion
       /// Downcast the `DataSourceExec`'s `data_source` to a specific file 
source
       ///
       /// Returns `None` if 
       /// 1. the datasource is not scanning files (`FileScanConfig`)
       /// 2. The [`FileScanConfig::file_source`] is not of type <T>
   ```



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