adriangb commented on code in PR #17242:
URL: https://github.com/apache/datafusion/pull/17242#discussion_r2301619788


##########
datafusion/datasource/src/file.rs:
##########
@@ -50,31 +65,31 @@ pub fn as_file_source<T: FileSource + 'static>(source: T) 
-> Arc<dyn FileSource>
 /// * 
[`ParquetSource`](https://docs.rs/datafusion/latest/datafusion/datasource/physical_plan/struct.ParquetSource.html)
 ///
 /// [`DataSource`]: crate::source::DataSource
-pub trait FileSource: Send + Sync {
+pub trait FileSource: fmt::Debug + Send + Sync {
+    fn config(&self) -> &FileScanConfig;
+
+    fn with_config(&self, config: FileScanConfig) -> Arc<dyn FileSource>;
+
+    fn as_data_source(&self) -> Arc<dyn DataSource>;
+
     /// Creates a `dyn FileOpener` based on given parameters
     fn create_file_opener(
         &self,
         object_store: Arc<dyn ObjectStore>,
-        base_config: &FileScanConfig,
         partition: usize,
     ) -> Arc<dyn FileOpener>;
     /// Any
     fn as_any(&self) -> &dyn Any;
     /// Return execution plan metrics
-    fn metrics(&self) -> &ExecutionPlanMetricsSet;
+    fn metrics_inner(&self) -> &ExecutionPlanMetricsSet;

Review Comment:
   I suspect most of the time it will be called on `Arc<dyn DataSource>` or 
`Arc<dyn FileSource>` not `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