You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Jonathan Keane (Jira)" <ji...@apache.org> on 2021/11/30 00:10:00 UTC
[jira] [Resolved] (ARROW-14722) [R] dplyr::arrange converts number values to negative
[ https://issues.apache.org/jira/browse/ARROW-14722?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jonathan Keane resolved ARROW-14722.
------------------------------------
Fix Version/s: 7.0.0
Resolution: Fixed
Issue resolved by pull request 11727
[https://github.com/apache/arrow/pull/11727]
> [R] dplyr::arrange converts number values to negative
> ------------------------------------------------------
>
> Key: ARROW-14722
> URL: https://issues.apache.org/jira/browse/ARROW-14722
> Project: Apache Arrow
> Issue Type: Bug
> Affects Versions: 6.0.0
> Reporter: Mislav Zorko
> Assignee: Will Jones
> Priority: Blocker
> Labels: pull-request-available
> Fix For: 7.0.0
>
> Time Spent: 2h 10m
> Remaining Estimate: 0h
>
> ```
> {code:java}
> # Load libraries
> library(arrow)
> library(dplyr)
> # Store table
> file_path <- tempfile()
> write_parquet(dplyr::tibble(a = 1:10, b = "A"), file_path)
> # Read table
> my_table <- read_parquet(file_path)
> # Table looks normal
> my_table
> # A tibble: 10 x 2
> # a b
> # <int> <chr>
> # 1 1 A
> # 2 2 A
> # 3 3 A
> # 4 4 A
> # 5 5 A
> # 6 6 A
> # 7 7 A
> # 8 8 A
> # 9 9 A
> # 10 10 A
> # First arrange changes number values to negative
> my_table %>% arrange(dplyr::desc(a))
> # A tibble: 10 x 2
> # a b
> # <int> <chr>
> # 1 -10 A
> # 2 -9 A
> # 3 -8 A
> # 4 -7 A
> # 5 -6 A
> # 6 -5 A
> # 7 -4 A
> # 8 -3 A
> # 9 -2 A
> # 10 -1 A
> # Even underlying data is changed!!!
> my_table
> # A tibble: 10 x 2
> # a b
> # <int> <chr>
> # 1 -10 A
> # 2 -9 A
> # 3 -8 A
> # 4 -7 A
> # 5 -6 A
> # 6 -5 A
> # 7 -4 A
> # 8 -3 A
> # 9 -2 A
> # 10 -1 A
> # Second arrange changes it back
> my_table %>% arrange(dplyr::desc(a))
> my_table
> # A tibble: 10 x 2
> # a b
> # <int> <chr>
> # 1 1 A
> # 2 2 A
> # 3 3 A
> # 4 4 A
> # 5 5 A
> # 6 6 A
> # 7 7 A
> # 8 8 A
> # 9 9 A
> # 10 10 A
> {code}
> ```
--
This message was sent by Atlassian Jira
(v8.20.1#820001)