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

Function test_defaults

datafusion/catalog/src/async.rs:715–735  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

713
714 #[tokio::test]
715 async fn test_defaults() {
716 for table_ref in &[
717 TableReference::full(MOCK_CATALOG, MOCK_SCHEMA, MOCK_TABLE),
718 TableReference::partial(MOCK_SCHEMA, MOCK_TABLE),
719 TableReference::bare(MOCK_TABLE),
720 ] {
721 let async_provider = MockAsyncCatalogProviderList::default();
722 let cached_provider = async_provider
723 .resolve(std::slice::from_ref(table_ref), &test_config())
724 .await
725 .unwrap();
726
727 let catalog = cached_provider
728 .catalog(table_ref.catalog().unwrap_or(MOCK_CATALOG))
729 .unwrap();
730 let schema = catalog
731 .schema(table_ref.schema().unwrap_or(MOCK_SCHEMA))
732 .unwrap();
733 assert!(schema.table(table_ref.table()).await.unwrap().is_some());
734 }
735 }
736}

Callers

nothing calls this directly

Calls 4

test_configFunction · 0.85
resolveMethod · 0.45
catalogMethod · 0.45
schemaMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…