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

Function test_count_run_end_encoded_nulls

python/pyarrow/tests/test_compute.py:3050–3059  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3048
3049
3050def test_count_run_end_encoded_nulls():
3051 arr = pc.run_end_encode(
3052 pa.array([1, 1, None, None, None, 2, 2, 2, None, 3]))
3053
3054 assert pc.count(arr, mode="only_valid").as_py() == 6
3055 assert pc.count(arr, mode="only_null").as_py() == 4
3056 assert pc.count(arr, mode="all").as_py() == 10
3057 # Slice crosses run boundaries: logical [None, None, 2, 2, 2, None].
3058 assert pc.count(arr.slice(3, 6), mode="only_valid").as_py() == 3
3059 assert pc.count(arr.slice(3, 6), mode="only_null").as_py() == 3
3060
3061
3062def test_count_sparse_union_sliced_nulls():

Callers

nothing calls this directly

Calls 4

as_pyMethod · 0.80
arrayMethod · 0.45
countMethod · 0.45
sliceMethod · 0.45

Tested by

no test coverage detected