vaibhavbodhane commented on code in PR #26920:
URL: https://github.com/apache/datafusion/pull/26920#discussion_r4440187786
##########
datafusion/datasource-parquet/src/reader.rs:
##########
@@ -77,6 +77,32 @@ pub trait ParquetFileReaderFactory: Debug + Send + Sync +
'static {
metadata_size_hint: Option<usize>,
metrics: &ExecutionPlanMetricsSet,
) -> datafusion_common::Result<Box<dyn AsyncFileReader + Send>>;
+
+ /// Like [`Self::create_reader`], but the reader should record into
+ /// `file_metrics`, the [`ParquetFileMetrics`] the caller has already
+ /// registered for this file, rather than registering another set in
+ /// `metrics`.
+ ///
+ /// The parquet opener calls this so that each file it opens registers one
+ /// set of file metrics. The default implementation ignores `file_metrics`
+ /// and calls [`Self::create_reader`], so existing implementations keep
+ /// their behavior.
+ fn create_reader_with_file_metrics(
Review Comment:
Pushed in 19828554c, rebased on main. `CreateReaderArgs` (private fields,
`new` + `with_*` builders, getters, `file_metrics_or_register()`),
`create_reader_with_args`, and `create_reader` deprecated since 56.0.0. The
custom reader test, the `parquet_advanced_index` example and a core test helper
use the new method, and there's an upgrade-guide entry. PTAL.
--
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]