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

[R] str_replace with NA does not match stringr behavior

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Critical
    • Resolution: Unresolved
    • None
    • None
    • R
    • None

    Description

      q <- data.table(x=c('','1','2'))
      q %>% write_dataset('q')
      
      #in R
      
      q %>% mutate(x2=x %>% str_replace('^
      s*$',NA_character_))
      
         x   x2
      1:   <NA>
      2: 1    1
      3: 2    2
      
      #in arrow
      
      q2 <- 'q' %>% open_dataset %>% mutate(x2=x %>% str_replace('^
      s*$',NA_character_)) %>% collect
      
      q2
      
         x x2
      1:     
      2: 1  1
      3: 2  2
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              lucasmation Lucas Mation
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated: