New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[R] binding for grepl has different behaviour with NA compared to R base grepl #31430
Comments
Andy Teucher / @ateucher: |
Jonathan Keane / @jonkeane: We would of course welcome a PR to add tests for this + update the Arrow |
Andy Teucher / @ateucher: |
Andy Teucher / @ateucher: |
Andy Teucher / @ateucher: I am struggling with a couple of things:
|
Jonathan Keane / @jonkeane: The string conversion from R is a bit complicated, but Lines 777 to 824 in ddb663b
All of that being said, I would probably go the second route you mention (and sorry for not responding with this earlier!):
You could put a call to |
Andy Teucher / @ateucher: I do think the R Just to clarify, using |
Jonathan Keane / @jonkeane: arrow/r/R/dplyr-funcs-datetime.R Lines 221 to 226 in 012ae6e
ISOdatetime to run sec=NA into 0 here (another R oddity!)
|
Andy Teucher / @ateucher: |
Andy Teucher / @ateucher: |
Jonathan Keane / @jonkeane: |
The arrow binding to
grepl
behaves slightly differently than the base R{}grepl{
}, in that it returnsNA
forNA
inputs, whereas basegrepl
returns{}FALSE with NA inputs. arrow's implementation is consistent with stringr::str_detect(){
}, and bothstr_detect()
andgrepl()
are bound tomatch_substring_regex
andmatch_substring
in arrow.I don't know if this is something you would want to change so that the
grepl
behaviour aligns with base{}grepl{
}, or simply document this difference?Reprex:
Reporter: Andy Teucher / @ateucher
Assignee: Andy Teucher / @ateucher
PRs and other links:
Note: This issue was originally created as ARROW-16007. Please see the migration documentation for further details.
The text was updated successfully, but these errors were encountered: