You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/07/28 15:10:26 UTC

[GitHub] [arrow-datafusion] andygrove commented on a change in pull request #789: Implement streaming versions of Dataframe.collect methods

andygrove commented on a change in pull request #789:
URL: https://github.com/apache/arrow-datafusion/pull/789#discussion_r678396699



##########
File path: datafusion/src/dataframe.rs
##########
@@ -222,6 +223,21 @@ pub trait DataFrame: Send + Sync {
     /// ```
     async fn collect(&self) -> Result<Vec<RecordBatch>>;
 
+    /// Executes this DataFrame and returns a stream over a single partition
+    ///
+    /// ```
+    /// # use datafusion::prelude::*;
+    /// # use datafusion::error::Result;
+    /// # #[tokio::main]
+    /// # async fn main() -> Result<()> {
+    /// let mut ctx = ExecutionContext::new();
+    /// let df = ctx.read_csv("tests/example.csv", CsvReadOptions::new())?;
+    /// let stream = df.collect_stream().await?;
+    /// # Ok(())
+    /// # }
+    /// ```
+    async fn collect_stream(&self) -> Result<SendableRecordBatchStream>;

Review comment:
       Good idea. I renamed these to `execute_stream` and `execute_stream_partitioned`




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org