dangotbanned opened a new issue, #48679:
URL: https://github.com/apache/arrow/issues/48679

   ### Describe the bug, including details regarding any error messages, 
version, and platform.
   
   ## Repro
   ```py
   from __future__ import annotations
   def pivot_wider(on: str, index: str, values: str) -> pa.Table:
       import pyarrow as pa
       import pyarrow.compute as pc  # noqa: F811
       from pyarrow.acero import AggregateNodeOptions, Declaration, 
TableSourceNodeOptions
   
       data = {
           "foo": ["A", "A", "B", "B", "C"],
           "bar": ["k", "l", "m", "n", "o"],
           "N1": [1, 2, 2, 4, 2],
           "N2": [1, 2, 2, 4, 2],
       }
   
       table = pa.Table.from_pydict(data)
       source = Declaration("table_source", 
options=TableSourceNodeOptions(table))
       key_names = table.column(on).unique().to_pylist()
       options = pc.PivotWiderOptions(key_names, 
unexpected_key_behavior="raise")
       aggregates = [([on, values], "hash_pivot_wider", options, values)]
       pivot = Declaration("aggregate", AggregateNodeOptions(aggregates, 
[index]))
       result = Declaration.from_sequence([source, pivot]).to_table()
       return result.flatten()
   ```
   
   ### Component(s)
   
   Python, C++


-- 
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]

Reply via email to