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

Function test_vector_struct

python/pyarrow/tests/test_udf.py:899–911  ·  view source on GitHub ↗
(struct_vector_func_fixture)

Source from the content-addressed store, hash-verified

897
898@pytest.mark.pandas
899def test_vector_struct(struct_vector_func_fixture):
900 k = pa.array(
901 [1, 1, 2, 2], pa.int64()
902 )
903 v = pa.array(
904 [1.0, 2.0, 3.0, 4.0], pa.float64()
905 )
906 c = pa.array(
907 ['v1', 'v2', 'v1', 'v2']
908 )
909 result = pc.call_function("y=pivot(x)", [k, v, c])
910 expected = struct_vector_func_fixture[0](None, k, v, c)
911 assert result == expected

Callers

nothing calls this directly

Calls 1

arrayMethod · 0.45

Tested by

no test coverage detected