adriangb commented on code in PR #21993:
URL: https://github.com/apache/datafusion/pull/21993#discussion_r3182110407


##########
datafusion/core/tests/parquet/custom_reader.rs:
##########
@@ -71,7 +71,7 @@ async fn 
route_data_access_ops_to_parquet_file_reader_factory() {
         .into_iter()
         .map(|meta| {
             PartitionedFile::new_from_meta(meta)

Review Comment:
   75b6e3d7c



##########
datafusion/physical-plan/src/operator_statistics/mod.rs:
##########
@@ -160,26 +159,22 @@ impl ExtendedStatistics {
 
     /// Get a reference to a custom statistics extension by type.
     pub fn get_extension<T: 'static + Send + Sync>(&self) -> Option<&T> {
-        self.extensions
-            .get(&TypeId::of::<T>())
-            .and_then(|ext| ext.downcast_ref())
+        self.extensions.get::<T>()
     }
 
     /// Set a custom statistics extension.
-    pub fn set_extension<T: 'static + Send + Sync>(&mut self, value: T) {
-        self.extensions.insert(TypeId::of::<T>(), Arc::new(value));
+    pub fn set_extension<T: 'static + Send + Sync>(&mut self, value: Arc<T>) {

Review Comment:
   bc0a3e030



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