Skip to content

Commit ba4711f

Browse files
committed
test: add test_iter_returns_datafusion_recordbatch to verify RecordBatch type
1 parent a9b6ac1 commit ba4711f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

python/tests/test_dataframe.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
reset_formatter,
4646
)
4747
from datafusion.expr import Window
48+
from datafusion.record_batch import RecordBatch as DataFusionRecordBatch
4849
from pyarrow.csv import write_csv
4950

5051
pa_cffi = pytest.importorskip("pyarrow.cffi")
@@ -398,6 +399,11 @@ def test_iter_batches(df):
398399
assert pa_batch.column(2).to_pylist() == [8, 5, 8]
399400

400401

402+
def test_iter_returns_datafusion_recordbatch(df):
403+
for batch in df:
404+
assert isinstance(batch, DataFusionRecordBatch)
405+
406+
401407
def test_to_record_batch_stream(df):
402408
stream = df.to_record_batch_stream()
403409
batches = list(stream)

0 commit comments

Comments
 (0)