wiedld commented on code in PR #7800:
URL: https://github.com/apache/arrow-datafusion/pull/7800#discussion_r1357681163


##########
datafusion/physical-plan/src/stream.rs:
##########
@@ -251,12 +208,95 @@ impl Stream for RecordBatchReceiverStream {
     }
 }
 
-impl RecordBatchStream for RecordBatchReceiverStream {
+impl<O: Send + Sync> ReceiverStream<O> {
+    /// Create a new [`ReceiverStream`] from the provided schema and stream
+    pub fn new(schema: SchemaRef, inner: BoxStream<'static, Result<O>>) -> 
Self {
+        Self { schema, inner }
+    }
+}
+
+impl RecordBatchStream for ReceiverStream<RecordBatch> {
     fn schema(&self) -> SchemaRef {
         self.schema.clone()
     }
 }
 
+#[async_trait::async_trait]
+pub(crate) trait StreamAdaptor: Send + Sync {
+    type Item: Send + Sync;
+
+    async fn call(

Review Comment:
   Nice. Updated. TY!



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to