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

Method read_table

datafusion/core/src/execution/context/mod.rs:1763–1769  ·  view source on GitHub ↗

Creates a [`DataFrame`] for a [`TableProvider`] such as a [`ListingTable`] or a custom user defined provider.

(&self, provider: Arc<dyn TableProvider>)

Source from the content-addressed store, hash-verified

1761 /// Creates a [`DataFrame`] for a [`TableProvider`] such as a
1762 /// [`ListingTable`] or a custom user defined provider.
1763 pub fn read_table(&self, provider: Arc<dyn TableProvider>) -> Result<DataFrame> {
1764 Ok(DataFrame::new(
1765 self.state(),
1766 LogicalPlanBuilder::scan(UNNAMED_TABLE, provider_as_source(provider), None)?
1767 .build()?,
1768 ))
1769 }
1770
1771 /// Creates a [`DataFrame`] for reading a [`RecordBatch`]
1772 pub fn read_batch(&self, batch: RecordBatch) -> Result<DataFrame> {

Callers 11

cacheMethod · 0.80
_read_typeMethod · 0.80
custom_source_dataframeFunction · 0.80
run_limit_testFunction · 0.80
test_aggregate_with_pkFunction · 0.80
test_aggregate_with_pk2Function · 0.80
test_aggregate_with_pk3Function · 0.80
test_aggregate_with_pk4Function · 0.80
udf_as_input_to_udfFunction · 0.80

Calls 5

newFunction · 0.85
provider_as_sourceFunction · 0.85
scanFunction · 0.50
stateMethod · 0.45
buildMethod · 0.45

Tested by 8

custom_source_dataframeFunction · 0.64
run_limit_testFunction · 0.64
test_aggregate_with_pkFunction · 0.64
test_aggregate_with_pk2Function · 0.64
test_aggregate_with_pk3Function · 0.64
test_aggregate_with_pk4Function · 0.64
udf_as_input_to_udfFunction · 0.64