Skip to content

Commit b66b441

Browse files
committed
Update documentation to reflect changes in execute_stream return type and usage
1 parent f4e76ea commit b66b441

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

docs/source/user-guide/dataframe/index.rst

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -208,17 +208,22 @@ Execute as Stream
208208

209209
For finer control over streaming execution, use
210210
:py:meth:`~datafusion.DataFrame.execute_stream` to obtain a
211-
:py:class:`pyarrow.RecordBatchReader`:
211+
:py:class:`datafusion.RecordBatchStream`:
212212

213213
.. code-block:: python
214214
215-
reader = df.execute_stream()
216-
for batch in reader:
215+
stream = df.execute_stream()
216+
for batch in stream:
217217
... # process each batch as it is produced
218218
219+
.. tip::
220+
221+
To get a PyArrow reader instead, call
222+
``pa.RecordBatchReader.from_stream(df)``.
223+
219224
When partition boundaries are important,
220225
:py:meth:`~datafusion.DataFrame.execute_stream_partitioned`
221-
returns an iterable of :py:class:`pyarrow.RecordBatchReader` objects, one per
226+
returns an iterable of :py:class:`datafusion.RecordBatchStream` objects, one per
222227
partition:
223228

224229
.. code-block:: python

0 commit comments

Comments
 (0)