Add iter method to extensions
diff --git a/datafusion/common/src/config.rs b/datafusion/common/src/config.rs
index 212db65..db9c7d4 100644
--- a/datafusion/common/src/config.rs
+++ b/datafusion/common/src/config.rs
@@ -1524,6 +1524,14 @@
let e = self.0.get_mut(T::PREFIX)?;
e.0.as_any_mut().downcast_mut()
}
+
+ /// Iterates all the config extension entries yielding their prefix and their
+ /// [ExtensionOptions] implementation.
+ pub fn iter(
+ &self,
+ ) -> impl Iterator<Item = (&'static str, &Box<dyn ExtensionOptions>)> {
+ self.0.iter().map(|(k, v)| (*k, &v.0))
+ }
}
#[derive(Debug)]