TPDeramus opened a new issue, #43336:
URL: https://github.com/apache/arrow/issues/43336

   ### Describe the bug, including details regarding any error messages, 
version, and platform.
   
   Hi Arrow Devs.
   
   I noticed an odd behavior for `str_starts()` for the package.
   
   So if you make an `arrow` table:
   
   ```
   df <- data.frame(
     Participant = c('Greg', 'Greg', 'Donna', 'Donna'),
     Category = c('F0', 'C0.1', '1', '01'),
     Rating = c(21, NA, 17, 21)) |> as_arrow_table()
   ```
   
   |Participant | Category | Rating|
   |--- | --- | ---|
   |Greg | F0 | 21|
   |Greg | C0.0 | NA|
   |Donna | 1 | 17|
   |Donna | 01 | 21|
   
   And want to filter the output to entries that start with several specific 
strings like so
   
   `filterlist <- c("F", "C", "1")`
   
   |Participant | Category | Rating|
   |--- | --- | ---|
   |Greg | F0 | 21|
   |Greg | C0.0 | NA|
   |Donna | 1 | 17|
   
   If I run a call like this one, it either fails or pulls it into `R`:
   
   ```
   df |>
     filter(str_starts(Category, paste(filterlist, collapse = "|")))
   Warning: Expression str_starts(Category, paste(filterlist, collapse = "|")) 
not supported in Arrow; pulling data into R
   ```
   
   But these two will run just fine and produce the desired output:
   
   ```
   df |>
     filter(str_starts(Category, "F|C|1"))
   
   df |>
     filter(str_starts(Category, filtervar))
   ```
   
   Is this a bug of some kind?
   
   ### Component(s)
   
   R


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to