tustvold commented on code in PR #3051:
URL: https://github.com/apache/arrow-datafusion/pull/3051#discussion_r940065636
##########
datafusion/core/src/physical_plan/file_format/parquet.rs:
##########
@@ -390,6 +433,63 @@ impl AsyncFileReader for ParquetFileReader {
}
}
+impl Display for DefaultParquetFileReaderFactory {
+ fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
+ write!(f, "DefaultParquetFileReaderFactory")
+ }
+}
+
+impl Debug for DefaultParquetFileReaderFactory {
+ fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
+ write!(f, "DefaultParquetFileReaderFactory")
+ }
+}
+
+impl ParquetFileReaderFactory for DefaultParquetFileReaderFactory {
+ fn create_reader(
+ &self,
+ file_meta: FileMeta,
+ metadata_size_hint: Option<usize>,
+ metrics: ParquetFileMetrics,
+ ) -> Result<Box<dyn AsyncFileReader + Send>> {
+ Ok(Box::new(ParquetFileReader {
+ meta: file_meta.object_meta,
+ store: Arc::clone(&self.store),
+ metadata_size_hint,
+ metrics,
+ }))
+ }
+}
+
+struct ThinFileReader {
Review Comment:
Within `parquet` we could `impl AsyncFileReader for Box<dyn
AsyncFileReader>`, but tbh I wonder if we should just type-erase by default
:thinking:
--
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]