Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-18244

[R] `mutate(x2=ifelse(x=='',NA,x))` Error: Function 'if_else' has no kernel matching input types

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 11.0.0
    • None
    • None

    Description

       

      ```

      q <- data.table(x=c('','30111976','01011976'))
      q %>% write_dataset('q')
      q2 <- 'q' %>% open_dataset %>% mutate(x2=ifelse(x=='',NA,x)) %>% collect
      Error in `collect()`:
      ! NotImplemented: Function 'if_else' has no kernel matching input types (bool, bool, string)
      Run `rlang::last_error()` to see where the error occurred.

      ```

      In Functions available in Arrow dplyr queries it is stated that ifelse() is available, but the error above suggests otherwise.

      Update, "str_replace" is another function that is supposedly available in 10.0.0 but is not (or does not seem to be):

      ```

      q2 <- 'q' %>% open_dataset %>% mutate(x2=x %>% str_replace('',NA)) %>% collect
      Error: Expression x %>% str_replace("", NA) not supported in Arrow
      Call collect() first to pull data into R.

      ```

       

      Attachments

        Issue Links

          Activity

            People

              npr Neal Richardson
              lucasmation Lucas Mation
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: