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

Function test_recordbatch_take

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

Source from the content-addressed store, hash-verified

702
703
704def test_recordbatch_take():
705 batch = pa.record_batch(
706 [pa.array([1, 2, 3, None, 5]),
707 pa.array(['a', 'b', 'c', 'd', 'e'])],
708 ['f1', 'f2'])
709 assert batch.take(pa.array([2, 3])).equals(batch.slice(2, 2))
710 assert batch.take(pa.array([2, None])).equals(
711 pa.record_batch([pa.array([3, None]), pa.array(['c', None])],
712 ['f1', 'f2']))
713
714
715def test_recordbatch_column_sets_private_name():

Callers

nothing calls this directly

Calls 4

equalsMethod · 0.80
arrayMethod · 0.45
takeMethod · 0.45
sliceMethod · 0.45

Tested by

no test coverage detected