adamreeve commented on code in PR #16738:
URL: https://github.com/apache/datafusion/pull/16738#discussion_r2314740865


##########
datafusion/datasource-parquet/src/file_format.rs:
##########
@@ -1654,7 +1636,8 @@ async fn output_single_parquet_file_parallelized(
     object_store_writer: Box<dyn AsyncWrite + Send + Unpin>,
     data: Receiver<RecordBatch>,
     output_schema: Arc<Schema>,
-    parquet_props: &WriterProperties,
+    writer_properties: &WriterProperties,
+    skip_arrow_metadata: bool,

Review Comment:
   Ah so the writer properties are created here:
   
https://github.com/apache/datafusion/blob/f363e382661a4f45dad2912e9988f1703e46939b/datafusion/datasource-parquet/src/file_format.rs#L1272
   
   And this method takes care of setting the schema in the metadata based on 
`skip_arrow_metadata`, which is needed because we were creating a lower-level 
`SerializedFileWriter` which doesn't do this automatically.
   
   But when creating an `ArrowWriter`, it will set the schema in the metadata 
automatically unless this is disabled. So we also need to disable arrow-rs 
doing this. I see this is already handled for the sequential write case in 
`create_async_arrow_writer`: 
https://github.com/apache/datafusion/blob/3abee73318f9f422e1b31ff8bb6a42362837d71d/datafusion/datasource-parquet/src/file_format.rs#L1174



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