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

Function execute_with_partition

datafusion/core/tests/sql/mod.rs:147–154  ·  view source on GitHub ↗

Execute SQL and return results

(
    sql: &str,
    partition_count: usize,
)

Source from the content-addressed store, hash-verified

145
146/// Execute SQL and return results
147async fn execute_with_partition(
148 sql: &str,
149 partition_count: usize,
150) -> Result<Vec<RecordBatch>> {
151 let tmp_dir = TempDir::new()?;
152 let ctx = create_ctx_with_partition(&tmp_dir, partition_count).await?;
153 plan_and_collect(&ctx, sql).await
154}
155
156/// Generate a partitioned CSV file and register it with an execution context
157async fn create_ctx_with_partition(

Callers 3

count_partitionedFunction · 0.85
count_aggregatedFunction · 0.85
count_aggregated_cubeFunction · 0.85

Calls 3

newFunction · 0.85
plan_and_collectFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…