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

Function load_table

datafusion/core/src/datasource/listing/table.rs:417–430  ·  view source on GitHub ↗
(
        ctx: &SessionContext,
        name: &str,
    )

Source from the content-addressed store, hash-verified

415 }
416
417 async fn load_table(
418 ctx: &SessionContext,
419 name: &str,
420 ) -> Result<Arc<dyn TableProvider>> {
421 let testdata = crate::test_util::parquet_test_data();
422 let filename = format!("{testdata}/{name}");
423 let table_path = ListingTableUrl::parse(filename)?;
424
425 let config = ListingTableConfig::new(table_path)
426 .infer(&ctx.state())
427 .await?;
428 let table = ListingTable::try_new(config)?;
429 Ok(Arc::new(table))
430 }
431
432 /// Check that the files listed by the table match the specified `output_partitioning`
433 /// when the object store contains `files`.

Callers 1

read_single_fileFunction · 0.85

Calls 4

parquet_test_dataFunction · 0.85
newFunction · 0.85
inferMethod · 0.80
stateMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…