Jefffrey commented on code in PR #19931:
URL: https://github.com/apache/datafusion/pull/19931#discussion_r2723697899


##########
datafusion/datasource/src/file_sink_config.rs:
##########
@@ -112,6 +112,11 @@ pub struct FileSinkConfig {
     pub keep_partition_by_columns: bool,
     /// File extension without a dot(.)
     pub file_extension: String,
+    /// Override for single file output behavior.
+    /// - `None`: use extension heuristic (path with extension = single file)
+    /// - `Some(true)`: force single file output at exact path
+    /// - `Some(false)`: force directory output with generated filenames
+    pub single_file_output: Option<bool>,

Review Comment:
   I think it would be better to make this an enum, something like
   
   ```rust
   enum FileOutputMode {
       Automatic,
       SingleFile,
       Directory,
   }
   ```
   
   It makes it clearer at a glance vs needing to check the comments to know 
what `None`, `Some(true)` and `Some(false)` mean



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