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

Method collect_partitioned

datafusion/core/src/dataframe/mod.rs:1607–1611  ·  view source on GitHub ↗

Executes this DataFrame and collects all results into a vector of vector of RecordBatch maintaining the input partitioning. # Example ``` # use datafusion::prelude::*; # use datafusion::error::Result; # #[tokio::main] # async fn main() -> Result<()> { let ctx = SessionContext::new(); let df = ctx .read_csv("tests/data/example.csv", CsvReadOptions::new()) .await?; let batches = df.collect_partitio

(self)

Source from the content-addressed store, hash-verified

1605 /// # }
1606 /// ```
1607 pub async fn collect_partitioned(self) -> Result<Vec<Vec<RecordBatch>>> {
1608 let task_ctx = Arc::new(self.task_ctx());
1609 let plan = self.create_physical_plan().await?;
1610 collect_partitioned(plan, task_ctx).await
1611 }
1612
1613 /// Executes this DataFrame and returns one stream per partition.
1614 ///

Callers 1

create_memory_tableMethod · 0.80

Calls 4

newFunction · 0.85
collect_partitionedFunction · 0.85
task_ctxMethod · 0.45
create_physical_planMethod · 0.45

Tested by

no test coverage detected