alamb commented on code in PR #24030:
URL: https://github.com/apache/datafusion/pull/24030#discussion_r3691575400


##########
datafusion-examples/examples/data_io/parquet_advanced_index.rs:
##########
@@ -583,16 +578,18 @@ impl ParquetFileReaderFactory for 
CachedParquetFileReaderFactory {
         Ok(Box::new(ParquetReaderWithCache {
             filename,
             metadata: Arc::clone(metadata),
-            inner,
+            object_store,
+            location,
         }))
     }
 }
 
-/// wrapper around a ParquetObjectReader that caches metadata
+/// An [`AsyncFileReader`] that reads from an [`ObjectStore`] and caches 
metadata
 struct ParquetReaderWithCache {
     filename: String,
     metadata: Arc<ParquetMetaData>,
-    inner: ParquetObjectReader,
+    object_store: Arc<dyn ObjectStore>,

Review Comment:
   this is arguable a nicer example now, as it avoids having to wrap the 
ParquetObjectReader



##########
datafusion-examples/examples/data_io/parquet_advanced_index.rs:
##########
@@ -568,13 +569,7 @@ impl ParquetFileReaderFactory for 
CachedParquetFileReaderFactory {
             .to_string();
 
         let object_store = Arc::clone(&self.object_store);
-        let mut inner =
-            ParquetObjectReader::new(object_store, 
partitioned_file.object_meta.location)
-                .with_file_size(partitioned_file.object_meta.size);
-
-        if let Some(hint) = metadata_size_hint {
-            inner = inner.with_footer_size_hint(hint)
-        };
+        let location = partitioned_file.object_meta.location;

Review Comment:
   `ParquetObjectReader` is deprecated due to 
   - https://github.com/apache/arrow-rs/issues/10308
   



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