adamreeve commented on code in PR #8162:
URL: https://github.com/apache/arrow-rs/pull/8162#discussion_r2361511303


##########
parquet/src/arrow/arrow_writer/mod.rs:
##########
@@ -426,6 +428,15 @@ impl<W: Write + Send> ArrowWriter<W> {
         row_group_writer.close()?;
         Ok(())
     }
+
+    /// Converts this writer into a lower-level [`SerializedFileWriter`] and 
[`ArrowRowGroupWriterFactory`].

Review Comment:
   > I spent quite a while trying to figure out why we can't just use 
get_column_writers.
   
   Sorry, I realise now that I didn't make this very clear in my original issue 
(#7359).
   
   One other factor is that we couldn't just use the `WriterProperties` passed 
to `get_column_writers` to internally create a new `FileEncryptor`. When a 
`FileEncryptor` is 
[created](https://github.com/apache/arrow-rs/blob/30a779878a617116afe73e48ac05abfff0040c6f/parquet/src/file/writer.rs#L187)
 for the `SerializedFileWriter`, it [generates random 
AAD](https://github.com/apache/arrow-rs/blob/11158ba8cfc471354ed14d04c88c9c631143459a/parquet/src/encryption/encrypt.rs#L302)
 (additional authentication data), and this AAD has to be the same for all 
encrypted modules in the file.



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

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

Reply via email to