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

Function scan_empty

datafusion/core/src/test_util/mod.rs:66–75  ·  view source on GitHub ↗

Scan an empty data source, mainly used in tests

(
    name: Option<&str>,
    table_schema: &Schema,
    projection: Option<Vec<usize>>,
)

Source from the content-addressed store, hash-verified

64
65/// Scan an empty data source, mainly used in tests
66pub fn scan_empty(
67 name: Option<&str>,
68 table_schema: &Schema,
69 projection: Option<Vec<usize>>,
70) -> Result<LogicalPlanBuilder> {
71 let table_schema = Arc::new(table_schema.clone());
72 let provider = Arc::new(EmptyTable::new(table_schema));
73 let name = TableReference::bare(name.unwrap_or(UNNAMED_TABLE));
74 LogicalPlanBuilder::scan(name, provider_as_source(provider), projection)
75}
76
77/// Scan an empty data source with configured partition, mainly used in tests.
78pub fn scan_empty_with_partitions(

Calls 4

newFunction · 0.85
provider_as_sourceFunction · 0.85
scanFunction · 0.50
cloneMethod · 0.45

Used in the wild real call sites across dependent graphs

searching dependent graphs…