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

Function test_empty_cast

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

Source from the content-addressed store, hash-verified

3609
3610
3611def test_empty_cast():
3612 types = [
3613 pa.null(),
3614 pa.bool_(),
3615 pa.int8(),
3616 pa.int16(),
3617 pa.int32(),
3618 pa.int64(),
3619 pa.uint8(),
3620 pa.uint16(),
3621 pa.uint32(),
3622 pa.uint64(),
3623 pa.float16(),
3624 pa.float32(),
3625 pa.float64(),
3626 pa.date32(),
3627 pa.date64(),
3628 pa.binary(),
3629 pa.binary(length=4),
3630 pa.string(),
3631 ]
3632
3633 for (t1, t2) in itertools.product(types, types):
3634 try:
3635 # ARROW-4766: Ensure that supported types conversion don't segfault
3636 # on empty arrays of common types
3637 pa.array([], type=t1).cast(t2)
3638 except (pa.lib.ArrowNotImplementedError, pa.ArrowInvalid):
3639 continue
3640
3641
3642def test_nested_dictionary_array():

Callers

nothing calls this directly

Calls 4

productMethod · 0.80
stringMethod · 0.45
castMethod · 0.45
arrayMethod · 0.45

Tested by

no test coverage detected