| 626 | |
| 627 | |
| 628 | def test_match_substring(): |
| 629 | arr = pa.array(["ab", "abc", "ba", None]) |
| 630 | result = pc.match_substring(arr, "ab") |
| 631 | expected = pa.array([True, True, False, None]) |
| 632 | assert expected.equals(result) |
| 633 | |
| 634 | arr = pa.array(["áB", "Ábc", "ba", None]) |
| 635 | result = pc.match_substring(arr, "áb", ignore_case=True) |
| 636 | expected = pa.array([True, True, False, None]) |
| 637 | assert expected.equals(result) |
| 638 | result = pc.match_substring(arr, "áb", ignore_case=False) |
| 639 | expected = pa.array([False, False, False, None]) |
| 640 | assert expected.equals(result) |
| 641 | |
| 642 | |
| 643 | def test_match_substring_regex(): |