rok commented on code in PR #6637:
URL: https://github.com/apache/arrow-rs/pull/6637#discussion_r1948941407


##########
parquet/src/file/serialized_reader.rs:
##########
@@ -338,14 +344,45 @@ impl<R: 'static + ChunkReader> RowGroupReader for 
SerializedRowGroupReader<'_, R
 }
 
 /// Reads a [`PageHeader`] from the provided [`Read`]
-pub(crate) fn read_page_header<T: Read>(input: &mut T) -> Result<PageHeader> {
+pub(crate) fn read_page_header<T: Read>(
+    input: &mut T,
+    #[cfg(feature = "encryption")] crypto_context: Option<Arc<CryptoContext>>,
+) -> Result<PageHeader> {
+    #[cfg(feature = "encryption")]
+    if let Some(crypto_context) = crypto_context {
+        let data_decryptor = crypto_context.data_decryptor();
+
+        let module_type = if crypto_context.dictionary_page {
+            ModuleType::DictionaryPageHeader
+        } else {
+            ModuleType::DataPageHeader
+        };
+        let aad = create_page_aad(

Review Comment:
   Changed. It doesn't feel like a big improvement, but let's see how it works 
when we do encryption.



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