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


##########
datafusion/core/src/datasource/file_format/mod.rs:
##########
@@ -63,6 +63,10 @@ pub trait FileFormatFactory: Sync + Send + GetExt {
 
     /// Initialize a [FileFormat] with all options set to default values
     fn default(&self) -> Arc<dyn FileFormat>;
+
+    /// Returns the table source as [`Any`] so that it can be

Review Comment:
   💯 



##########
datafusion/core/src/datasource/file_format/mod.rs:
##########
@@ -149,6 +154,11 @@ impl DefaultFileType {
             file_format_factory,
         }
     }
+
+    /// get a [FileFormatFactory] struct
+    pub fn get_format_factory(&self) -> Arc<dyn FileFormatFactory> {

Review Comment:
   Another more 'rust idomatic' way to do this might be a method like this 
(which would allow the user to choose to copy if they wanted or use the 
reference)
   
   ```rust
       /// get a reference to the inner [FileFormatFactory] struct
       pub fn as_format_factory(&self) -> &Arc<dyn FileFormatFactory> {
           &self.file_format_factory
       }
   ```
   
   



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