We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d5507a5 commit 806b07dCopy full SHA for 806b07d
1 file changed
python/tests/test_io.py
@@ -135,3 +135,17 @@ def test_table_from_batches_stream(ctx, fail_collect):
135
136
for batch in df:
137
assert isinstance(batch, pa.RecordBatch)
138
+import pyarrow as pa
139
+
140
141
+def test_table_from_batches_stream():
142
+ schema = pa.schema([pa.field("value", pa.int64(), nullable=False)])
143
+ batch = pa.RecordBatch.from_arrays([pa.array(range(10))], schema=schema)
144
+ reader = pa.RecordBatchReader.from_batches(schema, [batch])
145
+ result = pa.Table.from_batches(reader)
146
147
+ expected_schema = pa.schema([pa.field("value", pa.int64(), nullable=False)])
148
+ expected = pa.Table.from_arrays([pa.array(range(10))], schema=expected_schema)
149
150
+ assert result == expected
151
+ assert result.schema == expected_schema
0 commit comments