alamb commented on issue #3105:
URL:
https://github.com/apache/arrow-datafusion/issues/3105#issuecomment-1335292970
Strangely, if I run the function directly on `values` without first making a
table it works fine.
```
DataFusion CLI v14.0.0
❯ select median(column2) from (values ('host0', 90.1), ('host1', 90.2));
+-----------------+
| MEDIAN(column2) |
+-----------------+
| 90.15 |
+-----------------+
1 row in set. Query took 0.053 seconds.
❯ create table cpu (host string, usage float) as select * from (values
('host0', 90.1), ('host1', 90.2));
0 rows in set. Query took 0.005 seconds.
❯ select host, median(usage) from cpu group by host;
thread 'tokio-runtime-worker' panicked at 'unexpected accumulator state in
hash aggregate: Internal("AggregateState is not a scalar aggregate")',
/Users/alamb/Software/arrow-datafusion2/datafusion/core/src/physical_plan/aggregates/hash.rs:517:34
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
ArrowError(ExternalError(Context("Join Error",
External(JoinError::Panic(Id(51), ...)))))
```
--
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]