MCPcopy Create free account
hub / github.com/apache/datafusion / alter_test_extension_config

Function alter_test_extension_config

datafusion/common/src/config.rs:3450–3466  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3448
3449 #[test]
3450 fn alter_test_extension_config() {
3451 let mut extension = Extensions::new();
3452 extension.insert(TestExtensionConfig::default());
3453 let mut table_config = TableOptions::new().with_extensions(extension);
3454 table_config.set_config_format(ConfigFileType::CSV);
3455 table_config.set("format.delimiter", ";").unwrap();
3456 assert_eq!(table_config.csv.delimiter, b';');
3457 table_config.set("test.bootstrap.servers", "asd").unwrap();
3458 let kafka_config = table_config
3459 .extensions
3460 .get::<TestExtensionConfig>()
3461 .unwrap();
3462 assert_eq!(
3463 kafka_config.properties.get("bootstrap.servers").unwrap(),
3464 "asd"
3465 );
3466 }
3467
3468 #[test]
3469 fn iter_test_extension_config() {

Callers

nothing calls this directly

Calls 5

newFunction · 0.85
set_config_formatMethod · 0.80
insertMethod · 0.45
with_extensionsMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…