felipecrv commented on code in PR #15083:
URL: https://github.com/apache/arrow/pull/15083#discussion_r1082577383
##########
python/pyarrow/table.pxi:
##########
@@ -5358,36 +5358,45 @@ list[tuple(str, str, FunctionOptions)]
----
values_sum: [[3,7,5]]
keys: [["a","b","c"]]
+ >>> t.group_by("keys").aggregate([([], "count_all")])
+ pyarrow.Table
+ _count_all: int64
+ keys: string
+ ----
+ _count_all: [[2,2,1]]
+ keys: [["a","b","c"]]
>>> t.group_by("keys").aggregate([])
pyarrow.Table
keys: string
----
keys: [["a","b","c"]]
"""
- columns = [a[0] for a in aggregations]
+ target_cols = [a[0] if isinstance(a[0], (list, tuple)) else [
+ a[0]] for a in aggregations]
Review Comment:
I collapsed the conversions and now they look like your snipped.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]