crepererum commented on code in PR #2940:
URL: https://github.com/apache/arrow-datafusion/pull/2940#discussion_r924206887
##########
datafusion/core/src/execution/context.rs:
##########
@@ -1173,6 +1215,29 @@ impl SessionConfig {
);
map
}
+
+ /// Add extensions.
+ pub fn with_extension<T>(mut self, ext: Arc<T>) -> Self
+ where
+ T: Send + Sync + 'static,
+ {
+ let ext = ext as Arc<dyn Any + Send + Sync + 'static>;
+ let id = TypeId::of::<T>();
+ self.extensions.insert(id, ext);
+ self
+ }
+
+ /// Get extension.
Review Comment:
"..for specific **type**". The ID is invisible to the user. I've heavily
extended the docs to make that clearer.
##########
datafusion/core/src/execution/context.rs:
##########
@@ -1173,6 +1215,29 @@ impl SessionConfig {
);
map
}
+
+ /// Add extensions.
Review Comment:
done
--
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]