gabotechs commented on code in PR #19469:
URL: https://github.com/apache/datafusion/pull/19469#discussion_r2840975301
##########
datafusion/common/src/config.rs:
##########
@@ -1386,13 +1388,23 @@ impl ConfigOptions {
}
return Ok(());
}
- return ConfigField::set(self, key, value);
+ return ConfigField::set(self, inner_key, value);
+ }
+
+ if !self.extensions.0.contains_key(prefix)
+ && self
+ .extensions
+ .0
+ .contains_key(DATAFUSION_FFI_CONFIG_NAMESPACE)
+ {
+ inner_key = key;
+ prefix = DATAFUSION_FFI_CONFIG_NAMESPACE;
Review Comment:
I'm not sure if I completely follow how this looks like from the outside.
For example:
If I do something like:
```
SET custom_namespace.foo=1;
```
But no extension option with "custom_namespace" prefix exists, it will do a
second try doing the equivalent to:
```
SET datafusion_ffi.custom_namespace.foo=1;
```
Is that right?
##########
datafusion/common/src/config.rs:
##########
@@ -1386,13 +1388,23 @@ impl ConfigOptions {
}
return Ok(());
}
- return ConfigField::set(self, key, value);
+ return ConfigField::set(self, inner_key, value);
+ }
+
+ if !self.extensions.0.contains_key(prefix)
+ && self
+ .extensions
+ .0
+ .contains_key(DATAFUSION_FFI_CONFIG_NAMESPACE)
+ {
+ inner_key = key;
+ prefix = DATAFUSION_FFI_CONFIG_NAMESPACE;
}
Review Comment:
And in case the user does something like this directly:
```
SET datafusion_ffi.custom_namespace.foo;
```
I imagine that:
- If no `datafusion_ffi` namespace exists in the extension options, it will
attempt `datafusion_ffi.datafusion_ffi.custom_namespace.foo`?
- If `datafusion_ffi` actually exists in the namespace, then the FFI
mechanism will kick in and the value will be set in the Python world. Is that
right?
--
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]