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

Function test_recordbatch_take

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

Source from the content-addressed store, hash-verified

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