Skip to content

Commit e3e3b20

Browse files
committed
feat(dataframe): add synchronous wrapper for SendableRecordBatchStream
1 parent b63e559 commit e3e3b20

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/dataframe.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,13 @@ impl PyDataFrame {
353353
Ok(html_str)
354354
}
355355
}
356-
356+
/// Synchronous wrapper around a [`SendableRecordBatchStream`] used for
357+
/// the `__arrow_c_stream__` implementation.
358+
///
359+
/// It uses `runtime.block_on` to consume the underlying async stream,
360+
/// providing synchronous iteration. When a `projection` is set, each
361+
/// batch is converted via `record_batch_into_schema` to apply schema
362+
/// changes per batch.
357363
struct DataFrameStreamReader {
358364
stream: SendableRecordBatchStream,
359365
runtime: Handle,

0 commit comments

Comments
 (0)