houqp commented on a change in pull request #7666:
URL: https://github.com/apache/arrow/pull/7666#discussion_r451955910



##########
File path: rust/arrow/src/record_batch.rs
##########
@@ -216,15 +216,28 @@ impl Into<StructArray> for RecordBatch {
     }
 }
 
-/// Definition of record batch reader.
+/// Trait for types that can read `RecordBatch`'s in a single-threaded context.
 pub trait RecordBatchReader {
-    /// Returns schemas of this record batch reader.
-    /// Implementation of this trait should guarantee that all record batches 
returned
-    /// by this reader should have same schema as returned from this method.
+    /// Returns the schema of this `RecordBatchReader`.
+    ///
+    /// Implementation of this trait should guarantee that all `RecordBatch`'s 
returned by this
+    /// reader should have the same schema as returned from this method.
     fn schema(&mut self) -> SchemaRef;
 
-    /// Returns next record batch.
-    fn next_batch(&mut self) -> Result<Option<RecordBatch>>;
+    /// Reads the next `RecordBatch`.
+    fn next(&mut self) -> Result<Option<RecordBatch>>;
+}
+
+/// Trait for types that can read `RecordBatch`'s in a multi-threaded context.
+pub trait SendableRecordBatchReader: Send + Sync {

Review comment:
       I like `SendSync`, same length as Sendable, but more accurate. 
`Threaded` is another potential candidate as well. I wish there is a shorter 
word that conveys the same meaning as `Concurrent` :D




----------------------------------------------------------------
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.

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


Reply via email to