adamreeve commented on code in PR #7111: URL: https://github.com/apache/arrow-rs/pull/7111#discussion_r2011029754
########## parquet/src/file/writer.rs: ########## @@ -699,34 +803,61 @@ impl<'a> SerializedColumnWriter<'a> { /// `SerializedPageWriter` should not be used after calling `close()`. pub struct SerializedPageWriter<'a, W: Write> { sink: &'a mut TrackedWrite<W>, + #[cfg(feature = "encryption")] + page_encryptor: Option<PageEncryptor>, + #[cfg(not(feature = "encryption"))] + page_encryptor: Option<Never>, Review Comment: Hmm this is looking promising but I've hit a bit of a wall due to the compiler complaining about multiple mutable borrows of self.sink ([here](https://github.com/rok/arrow-rs/blob/9e79d75b3e15e45423b6f09225ab22fae11245e6/parquet/src/file/writer.rs#L836)), as it doesn't know that `page_encryptor_mut` only allows mutating the page encryptor. I might need to put the `BlockEncryptor` into a `RefCell` or `Mutex` so that the `PageEncryptor` methods can take `&self` instead of `&mut self`. -- 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