alamb commented on code in PR #8857:
URL: https://github.com/apache/arrow-rs/pull/8857#discussion_r2534197720


##########
parquet/src/arrow/async_reader/store.rs:
##########
@@ -213,6 +213,18 @@ impl AsyncFileReader for ParquetObjectReader {
                 );
             }
 
+            // Override page index policies from ArrowReaderOptions if 
specified and not Skip.
+            // When page_index_policy is Skip (default), use the reader's 
preload flags.
+            // When page_index_policy is Optional or Required, override the 
preload flags
+            // to ensure the specified policy takes precedence.
+            if let Some(options) = options {
+                if options.page_index_policy != PageIndexPolicy::Skip {
+                    metadata = metadata
+                        .with_column_index_policy(options.page_index_policy)
+                        .with_offset_index_policy(options.page_index_policy);

Review Comment:
   I think you could use `with_page_index_policy` which sets both column index 
and offset index policy: 
https://github.com/apache/arrow-rs/blob/a0db1985c3a0f3190cfc5166b428933a28c740f9/parquet/src/file/metadata/reader.rs#L150-L149
   
   ```suggestion
                       metadata = metadata
                           .with_page_index_policy(options.page_index_policy);
   ```



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

Reply via email to