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

[R] Simple arrange %>% head does not respect ordering

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • None
    • 6.0.0
    • R
    • None

    Description

      This was originally reported by jonkeane in ARROW-13893 but that issue was covering a different topic so I am opening a new issue for this specific behavior.

      > library(arrow)
      > library(dplyr)
      > 
      > tab <- Table$create(mtcars)
      > 
      > tab %>% 
      +   arrange(mpg) %>% 
      +   head(4) %>% 
      +   collect()
         mpg cyl disp  hp drat    wt  qsec vs am gear carb
      1 21.0   6  160 110 3.90 2.620 16.46  0  1    4    4
      2 21.0   6  160 110 3.90 2.875 17.02  0  1    4    4
      3 22.8   4  108  93 3.85 2.320 18.61  1  1    4    1
      4 21.4   6  258 110 3.08 3.215 19.44  1  0    3    1
      > 
      > mtcars %>% 
      +   arrange(mpg) %>% 
      +   head(4) %>% 
      +   collect()
                           mpg cyl disp  hp drat    wt  qsec vs am gear carb
      Cadillac Fleetwood  10.4   8  472 205 2.93 5.250 17.98  0  0    3    4
      Lincoln Continental 10.4   8  460 215 3.00 5.424 17.82  0  0    3    4
      Camaro Z28          13.3   8  350 245 3.73 3.840 15.41  0  0    3    4
      Duster 360          14.3   8  360 245 3.21 3.570 15.84  0  0    3    4
      

      Attachments

        Activity

          People

            npr Neal Richardson
            westonpace Weston Pace
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: