You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "alamb (via GitHub)" <gi...@apache.org> on 2023/08/08 13:24:59 UTC

[GitHub] [arrow-datafusion] alamb commented on a diff in pull request #7229: Minor: remove duplication in `create_writer`

alamb commented on code in PR #7229:
URL: https://github.com/apache/arrow-datafusion/pull/7229#discussion_r1287113760


##########
datafusion/core/src/datasource/file_format/csv.rs:
##########
@@ -494,56 +490,6 @@ impl CsvSink {
             file_compression_type,
         }
     }
-
-    // Create a write for Csv files
-    async fn create_writer(

Review Comment:
   the whole point of this PR is to move this into a free function that is shared rather than have two copies



##########
datafusion/core/src/datasource/file_format/mod.rs:
##########
@@ -235,7 +239,7 @@ pub(crate) enum AbortMode {
 }
 
 /// A wrapper struct with abort method and writer
-struct AbortableWrite<W: AsyncWrite + Unpin + Send> {
+pub(crate) struct AbortableWrite<W: AsyncWrite + Unpin + Send> {

Review Comment:
   this module is getting pretty large -- I think it would be easier to navigate it if were split into some smaller modules (e.g. put the write related code into `datafusion/core/src/datasource/file_format/write.rs`, for example). Any interest in doing so @devinjdangelo  or @metesynnada ? If not, I can give it a try



-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org