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


##########
datafusion/datasource/src/file.rs:
##########
@@ -157,30 +156,4 @@ pub trait FileSource: Send + Sync {
     ) -> Result<Option<Arc<dyn FileSource>>> {
         Ok(None)
     }
-
-    /// Set optional schema adapter factory.
-    ///
-    /// [`SchemaAdapterFactory`] allows user to specify how fields from the
-    /// file get mapped to that of the table schema.  If you implement this
-    /// method, you should also implement [`schema_adapter_factory`].
-    ///
-    /// The default implementation returns a not implemented error.
-    ///
-    /// [`schema_adapter_factory`]: Self::schema_adapter_factory
-    fn with_schema_adapter_factory(
-        &self,
-        _factory: Arc<dyn SchemaAdapterFactory>,
-    ) -> Result<Arc<dyn FileSource>> {

Review Comment:
   Can you give an example of a use case for these trait methods? Who is using 
a custom `FileSource` without using `FileScanConfig`? Why can't they attach the 
adapter to the concrete type, i.e. why does it have to be part of the trait? As 
far as I could see these methods were only being used by our own tests.



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