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

[R] Implement exp() and sqrt() in Arrow dplyr queries

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 8.0.0
    • 9.0.0
    • R
    • Windows 10, R 4.2.0, RStudio 2022.02.3 Build 492

    Description

      The change log for v8.0.0 notes that functions like exp(), log() and sqrt() can be used in R. I have been trying to calculate exp on a field in a dataset, but this does not work. I can calculate exp(10) on just some number, and I can raise to e manually (2.71828^). Here's some basic reproducible code:

      ```{r}
      test_df <- data.frame(x = c(1, 2, 3, 4, 5), y = c(1, 2, 3, 4, 5))
      write_dataset(test_df, "./test_ds")
      test_ds <- open_dataset("./test_ds")
      
      # does not work
      
      test_ds %>% mutate(z = exp(x)) %>% collect()
      
      # does work
      
      test_ds %>% mutate(z = 2.71828^(x)) %>% collect()
      
      # also works
      
      test_ds %>% mutate(z = exp(10)) %>% collect()
      ``` 

       

       

      Attachments

        Issue Links

          Activity

            People

              higgicd Chris Higgins
              higgicd Chris Higgins
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h
                  1h