mertak-synnada commented on code in PR #15416:
URL: https://github.com/apache/datafusion/pull/15416#discussion_r2011761950


##########
datafusion/datasource/src/source.rs:
##########
@@ -230,4 +231,17 @@ impl DataSourceExec {
             Boundedness::Bounded,
         )
     }
+
+    /// Downcast the `DataSourceExec` to a specific file source
+    pub fn downcast_to_source<T: 'static>(&self) -> Option<(&FileScanConfig, 
&T)> {

Review Comment:
   Looks like a great simplification I think, thanks!
   
   But since `data_source` can be both `FileScanConfig` or `MemorySourceConfig` 
maybe renaming this function as `downcast_to_file_source` would be better. Or 
we can dynamically check the `T` and downcast properly I think.
   
   Also is there any need for '`static` ?



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