CTTY commented on code in PR #2181:
URL: https://github.com/apache/iceberg-rust/pull/2181#discussion_r2874973091


##########
crates/iceberg/src/arrow/reader.rs:
##########
@@ -60,14 +60,36 @@ use crate::spec::{Datum, NameMapping, NestedField, 
PrimitiveType, Schema, Type};
 use crate::utils::available_parallelism;
 use crate::{Error, ErrorKind};
 
+/// Options for tuning Parquet file I/O.
+#[derive(Clone, Copy, Debug)]
+pub(crate) struct ParquetReadOptions {
+    pub metadata_size_hint: Option<usize>,
+    /// Gap threshold for merging nearby byte ranges into a single request.
+    pub range_coalesce_bytes: u64,
+    /// Maximum number of merged byte ranges to fetch concurrently.
+    pub range_fetch_concurrency: usize,
+}
+
+impl Default for ParquetReadOptions {
+    /// Defaults match object_store's OBJECT_STORE_COALESCE_DEFAULT and
+    /// OBJECT_STORE_COALESCE_PARALLEL.
+    fn default() -> Self {
+        Self {
+            metadata_size_hint: None,
+            range_coalesce_bytes: 1024 * 1024,
+            range_fetch_concurrency: 10,

Review Comment:
   nit: Should we define const for these static values?



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to