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

Function test_large_binary_value

python/pyarrow/tests/test_convert_builtin.py:863–872  ·  view source on GitHub ↗
(ty)

Source from the content-addressed store, hash-verified

861@pytest.mark.large_memory
862@pytest.mark.parametrize("ty", [pa.large_binary(), pa.large_string()])
863def test_large_binary_value(ty):
864 # Construct a large binary array with a single value larger than 4GB
865 s = b"0123456789abcdefghijklmnopqrstuvwxyz"
866 nrepeats = math.ceil((2**32 + 5) / len(s))
867 arr = pa.array([b"foo", s * nrepeats, None, b"bar"], type=ty)
868 assert isinstance(arr, pa.Array)
869 assert arr.type == ty
870 assert len(arr) == 4
871 buf = arr[1].as_buffer()
872 assert len(buf) == len(s) * nrepeats
873
874
875@pytest.mark.large_memory

Callers

nothing calls this directly

Calls 2

lenFunction · 0.85
arrayMethod · 0.45

Tested by

no test coverage detected