[
https://issues.apache.org/jira/browse/ARROW-12710?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17524935#comment-17524935
]
Antoine Pitrou commented on ARROW-12710:
----------------------------------------
This is actually doable now by passing a ListScalar to the {{binary_join}}
compute function. For example in Python:
{code:python}
>>> arr = pa.array(["abc", "def", "ghi"])
>>> scal = pa.ListArray.from_arrays([0, len(arr)], arr)[0]
>>> scal
<pyarrow.ListScalar: ['abc', 'def', 'ghi']>
>>> pc.binary_join(scal, "-")
<pyarrow.StringScalar: 'abc-def-ghi'>
{code}
(note that creating the ListScalar is a bit cumbersome in Python, I filed
ARROW-16254 for this)
[~icook] Can we then close this issue?
> [C++] String concatenate aggregate kernel
> -----------------------------------------
>
> Key: ARROW-12710
> URL: https://issues.apache.org/jira/browse/ARROW-12710
> Project: Apache Arrow
> Issue Type: New Feature
> Components: C++
> Reporter: Ian Cook
> Priority: Major
> Labels: kernel
> Fix For: 9.0.0
>
>
> Like MySQL/Impala {{group_concat}} and PostgreSQL {{string_agg}}. Takes a
> string array and a separator (possibly optional?) and returns one scalar
> string (one per group in the case of group aggregation) representing all the
> string values in the array concatenated together, with the separator added
> between each pair of concatenated values.
> For example, in the case of no grouping and using separator {{"-"}}, this
> would take input:
> {code}
> Array<string>
> [
> "foo",
> "bar",
> "baz"
> ]
> {code}
> and return the following string scalar as output:
> {code}
> "foo-bar-baz"
> {code}
>
--
This message was sent by Atlassian Jira
(v8.20.7#820007)