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)
| 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 | /// |
no test coverage detected