forked from apache/arrow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ARROW-13860: [R] arrow 5.0.0 write_parquet throws error writing group…
…ed data.frame * `Table/RecordBatch$create()` on `grouped_df` no longer returns an `arrow_dplyr_query`, which was the change in the last release. This means these functions are type stable again, and this fixes the user report that write_parquet() doesn't work. * Instead of creating `arrow_dplyr_query`, group vars are stored in a special `.group_vars` attribute in the `metadata$r`. This attribute is used to restore groups on the round trip back to R, so `grouped_df %>% record_batch() %>% as.data.frame()` returns a `grouped_df` * The current dplyr release caches a lot of metadata about groups in a `grouped_df`, including all row indices matching each group value. This bloated the schema metadata we serialize, so it has been removed here. When converting back to a `grouped_df`/`data.frame`, dplyr will recreate this metadata. * The `group_vars()` and `ungroup()` methods for `ArrowTabular` read/write this new `metadata$r$attributes$.group_vars` field, so `df %>% group_by() %>% record_batch() %>% group_vars()` returns the same as `df %>% record_batch() %>% group_by() %>% group_vars()`. `arrow_dplyr_query()` also picks up on it. * New helper active binding `$r_metadata` to wrap the (de)serialization into the Arrow string KeyValueMetadata Closes apache#11315 from nealrichardson/fix-grouped-df Authored-by: Neal Richardson <[email protected]> Signed-off-by: Jonathan Keane <[email protected]>
- Loading branch information
1 parent
5845556
commit 7eba115
Showing
13 changed files
with
144 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.