You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "coady (via GitHub)" <gi...@apache.org> on 2023/06/17 21:59:03 UTC
[GitHub] [arrow] coady opened a new issue, #36149: `table.group_by([]).aggregate` raises an error on some aggregate functions.
coady opened a new issue, #36149:
URL: https://github.com/apache/arrow/issues/36149
### Describe the bug, including details regarding any error messages, version, and platform.
Grouping on empty keys aggregates against the whole table (relates to #14896). But there are 3 hash aggregate functions which do not have corresponding scalar aggregate functions: `hash_distinct`, `hash_list`, and `hash_one`. Grouping on empty keys with those raises a key error.
```python
In []: table = pa.table({'key': list('aba'), 'value': [0, 1, 2]})
In []: table.group_by(['key']).aggregate([('value', 'list')])
Out[]:
pyarrow.Table
key: string
value_list: list<item: int64>
child 0, item: int64
----
key: [["a","b"]]
value_list: [[[0,2],[1]]]
In []: table.group_by([]).aggregate([('value', 'list')])
...
ArrowKeyError: No function registered with name: list
In []: table.group_by([]).aggregate([('value', 'min')])
Out[]:
pyarrow.Table
value_min: int64
----
value_min: [[0]]
```
### Component(s)
C++, Python
--
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: issues-unsubscribe@arrow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow] vibhatha commented on issue #36149: `table.group_by([]).aggregate` raises an error on some aggregate functions.
Posted by "vibhatha (via GitHub)" <gi...@apache.org>.
vibhatha commented on issue #36149:
URL: https://github.com/apache/arrow/issues/36149#issuecomment-1634422769
take
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org