MCPcopy Create free account
hub / github.com/apache/arrow / test_recordbatch_itercolumns

Function test_recordbatch_itercolumns

python/pyarrow/tests/test_table.py:660–674  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

658
659
660def test_recordbatch_itercolumns():
661 data = [
662 pa.array(range(5), type='int16'),
663 pa.array([-10, -5, 0, None, 10], type='int32')
664 ]
665 batch = pa.record_batch(data, ['c0', 'c1'])
666
667 columns = []
668 for col in batch.itercolumns():
669 columns.append(col)
670
671 assert batch.columns == columns
672 assert batch == pa.record_batch(columns, names=batch.column_names)
673 assert batch != pa.record_batch(columns[1:], names=batch.column_names[1:])
674 assert batch != columns
675
676
677def test_recordbatch_equals():

Callers

nothing calls this directly

Calls 2

arrayMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected