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

Function test_match_like

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

Source from the content-addressed store, hash-verified

611
612
613def test_match_like():
614 arr = pa.array(["ab", "ba%", "ba", "ca%d", None])
615 result = pc.match_like(arr, r"_a\%%")
616 expected = pa.array([False, True, False, True, None])
617 assert expected.equals(result)
618
619 arr = pa.array(["aB", "bA%", "ba", "ca%d", None])
620 result = pc.match_like(arr, r"_a\%%", ignore_case=True)
621 expected = pa.array([False, True, False, True, None])
622 assert expected.equals(result)
623 result = pc.match_like(arr, r"_a\%%", ignore_case=False)
624 expected = pa.array([False, False, False, True, None])
625 assert expected.equals(result)
626
627
628def test_match_substring():

Callers

nothing calls this directly

Calls 2

equalsMethod · 0.80
arrayMethod · 0.45

Tested by

no test coverage detected