timsaucer commented on code in PR #19469:
URL: https://github.com/apache/datafusion/pull/19469#discussion_r2842595482


##########
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:
   Maybe this helps. In my current datafusion-python branch I have the 
following:
   
   ```
   from datafusion import SessionConfig, SessionContext
   from datafusion_ffi_example import MyConfig
   
   
   def test_catalog_provider():
       config = MyConfig()
       config = SessionConfig(
           {"datafusion.catalog.information_schema": "true"}
       ).with_extension(config)
       config.set("my_config.baz_count", "42")
       ctx = SessionContext(config)
   
       ctx.sql("SHOW my_config.baz_count;").show()
   
       ctx.sql("SET my_config.baz_count=1;")
       ctx.sql("SHOW my_config.baz_count;").show()
   
       ctx.sql("SET datafusion_ffi.my_config.baz_count=99;")
       ctx.sql("SHOW my_config.baz_count;").show()
   ```
   
   This generates
   ```
   DataFrame()
   +---------------------+-------+
   | name                | value |
   +---------------------+-------+
   | my_config.baz_count | 42    |
   +---------------------+-------+
   DataFrame()
   +---------------------+-------+
   | name                | value |
   +---------------------+-------+
   | my_config.baz_count | 1     |
   +---------------------+-------+
   DataFrame()
   +---------------------+-------+
   | name                | value |
   +---------------------+-------+
   | my_config.baz_count | 99    |
   +---------------------+-------+
   ```



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