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

[C++][R] Ensure groupers accept scalar inputs (was: Allow me to group_by + summarise() with partitioning fields)

    XMLWordPrintableJSON

Details

    Description

      If one puts a field that is one of the partitioning variables in group_by() and then summarises, we get a segfault:

      library(arrow)
      library(dplyr)
      
      temp <- tempfile()
      
      write_dataset(mtcars, path = temp, partitioning = "cyl")
      
      ds <- open_dataset(temp)
      
      # this works just fine
      ds %>% 
        group_by(gear) %>% 
        summarise(
          sum(mpg)
        ) %>% 
        collect()
      
      # however this segfaults (regardless of the aggregation, even simply n()) 
      #  *** caught segfault ***
      # address 0x0, cause 'memory not mapped'
      ds %>% 
        group_by(cyl) %>% 
        summarise(
          sum(mpg)
        ) %>% 
        collect()
      

      Attachments

        Issue Links

          Activity

            People

              lidavidm David Li
              jonkeane Jonathan Keane
              Votes:
              0 Vote for this issue
              Watchers:
              3 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 10m
                  1h 10m