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

   ### Describe the bug, including details regarding any error messages, 
version, and platform.
   
   Hi Arrow Devs.
   
   This may be more general use but I thought it was more of a bug given this 
is already meant to be implemented in the documentation.
   
   https://arrow.apache.org/docs/r/reference/acero.html
   
   I'm attempting to either filter or `if_else` an `arrow` table to set a new 
column to be either 0 or 1 based on the presence of a specific string, but the 
commands I would normally use to do so are insisting on pulling the entire 
table into `R` before performing the filtering (which I would rather it not do).
   
   Like so:
   
   ```
   LargeTable |> filter(arrow_match_substring_regex(Column_of_interest,{pattern 
= "keyword"}))
   Warning: Expression arrow_match_substring_regex(Column_of_interest, {... not 
supported in Arrow; pulling data into R
   
   LargeTable |> filter(str_detect("keyword",Column_of_interest))
   Warning: Expression str_detect("keyword", Column_of_interest) not supported 
in Arrow; pulling data into R
   
   LargeTable |> mutate(N_bup_dispensing = if_else((str_detect("keyword", 
Column_of_interest)),1,0,missing=0))
   Warning: Expression if_else((str_detect("keyword", Column_of_interest)), 1, 
0, missing = 0) not supported in Arrow; pulling data into R
   
   LargeTable |> mutate(N_bup_dispensing = 
if_else(arrow_match_substring_regex(Column_of_interest,{pattern = 
"keyword"}),1,0,missing=0))
   Warning: Expression if_else(arrow_match_substring_regex(Column_of_interest, 
{... not supported in Arrow; pulling data into R
   ```
   
   Is there something wrong with my syntax or is this a bug of some kind?
   
   sessInfo() (locale/tz removed) below:
   ```
   R version 4.3.2 (2023-10-31)
   Platform: x86_64-pc-linux-gnu (64-bit)
   Running under: Red Hat Enterprise Linux 9.3 (Plow)
   
   Matrix products: default
   BLAS/LAPACK: FlexiBLAS OPENBLAS-OPENMP;  LAPACK version 3.9.0
   
   attached base packages:
   [1] stats     graphics  grDevices datasets  utils     methods   base     
   
   other attached packages:
    [1] microbenchmark_1.4.10 profmem_0.6.0         fastDummies_1.7.3     
glue_1.7.0            data.table_1.15.4    
    [6] janitor_2.2.0         readxl_1.4.3          reticulate_1.38.0     
parquetize_0.5.7      arrow_16.1.0         
   [11] haven_2.5.4           fs_1.6.4              lubridate_1.9.3       
forcats_1.0.0         stringr_1.5.1        
   [16] dplyr_1.1.4           purrr_1.0.2           readr_2.1.5           
tidyr_1.3.1           tibble_3.2.1         
   [21] ggplot2_3.5.1         tidyverse_2.0.0      
   
   loaded via a namespace (and not attached):
    [1] gtable_0.3.5      xfun_0.45         lattice_0.22-6    tzdb_0.4.0        
vctrs_0.6.5       tools_4.3.2       generics_0.1.3   
    [8] curl_5.2.1        parallel_4.3.2    fansi_1.0.6       RSQLite_2.3.7     
blob_1.2.4        pkgconfig_2.0.3   Matrix_1.6-1.1   
   [15] assertthat_0.2.1  lifecycle_1.0.4   compiler_4.3.2    munsell_0.5.1     
fst_0.9.8         snakecase_0.11.1  yaml_2.3.9       
   [22] pillar_1.9.0      cachem_1.1.0      tidyselect_1.2.1  stringi_1.8.4     
fastmap_1.2.0     grid_4.3.2        colorspace_2.1-0 
   [29] cli_3.6.3         magrittr_2.0.3    utf8_1.2.4        withr_3.0.0       
scales_1.3.0      bit64_4.0.5       timechange_0.3.0 
   [36] bit_4.0.5         cellranger_1.1.0  png_0.1-8         hms_1.1.3         
memoise_2.0.1     fstcore_0.9.18    knitr_1.48       
   [43] rlang_1.1.4       Rcpp_1.0.12       DBI_1.2.3         renv_1.0.7        
rstudioapi_0.16.0 jsonlite_1.8.8    R6_2.5.1   
   ```
   
   ### 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