Group by column name may conflict with aggregation columns, even if renamed #16170
Closed
2 tasks done
Labels
accepted
Ready for implementation
bug
Something isn't working
needs triage
Awaiting prioritization by a maintainer
python
Related to Python Polars
Checks
Reproducible example
Log output
$ POLARS_VERBOSE=1 python3 repro.py 1>/dev/null keys/aggregates are not partitionable: running default HASH AGGREGATION keys/aggregates are not partitionable: running default HASH AGGREGATION
Issue description
The repro gives the following output
Gives me the result
I would have expected the result of the two to be the same. The confusion seems to be that the group by expression is itself called
A
. However, this does not explain whyA
separately in theagg
call works in the 2nd case;A
together withB
andC
does not.(It may have something to do with how
.name.prefix()
works, e.g. it activates too late, but that's just a guess.)Expected behavior
That both calls gives the same resulting dataframe, with
A
,mean_A
,mean_B
, andmean_C
in both cases.Installed versions
The text was updated successfully, but these errors were encountered: