[
https://issues.apache.org/jira/browse/ARROW-12711?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ian Cook updated ARROW-12711:
-----------------------------
Description:
These are the aggregating versions of string concatenation—they combine values
from a set of rows into a single value.
The bindings for {{paste()}} and {{str_c()}} might be tricky to implement
because when these functions are called with the {{coallapse}} argument unset,
they do _not_ aggregate.
In {{summarise()}} we need to be able to use scalar concatenation within
aggregate concatenation, like this:
{code:java}
starwars %>%
filter(!is.na(hair_color) & !is.na(eye_color)) %>%
group_by(homeworld) %>%
summarise(hair_and_eyes = paste0(paste0(hair_color, "-haired and ",
"eye_color", "-eyed"), collapse = ", ")){code}
was:These are the aggregating versions of string concatenation—they combine
values from a set of rows into a single value.
> [R] Bindings for paste(collapse), str_c(collapse), and str_flatten()
> --------------------------------------------------------------------
>
> Key: ARROW-12711
> URL: https://issues.apache.org/jira/browse/ARROW-12711
> Project: Apache Arrow
> Issue Type: New Feature
> Components: R
> Reporter: Ian Cook
> Priority: Major
> Labels: query-engine
> Fix For: 6.0.0
>
>
> These are the aggregating versions of string concatenation—they combine
> values from a set of rows into a single value.
> The bindings for {{paste()}} and {{str_c()}} might be tricky to implement
> because when these functions are called with the {{coallapse}} argument
> unset, they do _not_ aggregate.
> In {{summarise()}} we need to be able to use scalar concatenation within
> aggregate concatenation, like this:
> {code:java}
> starwars %>%
> filter(!is.na(hair_color) & !is.na(eye_color)) %>%
> group_by(homeworld) %>%
> summarise(hair_and_eyes = paste0(paste0(hair_color, "-haired and ",
> "eye_color", "-eyed"), collapse = ", ")){code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)