zhuqi-lucas commented on code in PR #8857:
URL: https://github.com/apache/arrow-rs/pull/8857#discussion_r2534232229


##########
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:
   Thank you @alamb , good suggestion!



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