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

Function test_map_cast

python/pyarrow/tests/test_array.py:1242–1251  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1240
1241
1242def test_map_cast():
1243 # GH-38553
1244 t = pa.map_(pa.int64(), pa.int64())
1245 arr = pa.array([{1: 2}], type=t)
1246 result = arr.cast(pa.map_(pa.int32(), pa.int64()))
1247
1248 t_expected = pa.map_(pa.int32(), pa.int64())
1249 expected = pa.array([{1: 2}], type=t_expected)
1250
1251 assert result.equals(expected)
1252
1253
1254def test_map_labelled():

Callers

nothing calls this directly

Calls 3

equalsMethod · 0.80
arrayMethod · 0.45
castMethod · 0.45

Tested by

no test coverage detected