Commits


Andy Teucher authored and Jonathan Keane committed 5bd4d8ec279
ARROW-16007: [R] grepl bindings return FALSE for NA inputs This ensures that the `grepl` binding mimics R's base `grepl` by returning `FALSE` for `NA` inputs (previously it returned `NA`). As several other bindings called the `grepl` binding and we don't want the `grepl` behaviour with `NA` to propagate to those bindings (they all return `NA` with `NA` inputs), I had to change how they were constructed as well. I abstracted out the main parts of the `register_binding` for the string matching functions (those that return a `logical`) into a helper function `create_string_match_expr()`, which is used by the bindings for `grepl`, `str_detect`, `str_starts`, and `str_ends`. I added several tests for `NA` behaviour - which [failed before the changes](https://github.com/ateucher/arrow/actions/runs/2037010015) and now pass (at least locally, will wait for CI to finish here) Closes #12711 from ateucher/r-grepl-na-false Authored-by: Andy Teucher <andy.teucher@gmail.com> Signed-off-by: Jonathan Keane <jkeane@gmail.com>