Unexpected failure in a subquery with a filter (SQLStorm)
Open
bug
- Dominant language
- Rust
- Stars
- 9.3k
- Forks
- 2.4k
- Avg merge
- 3d 7h
- Merged PRs (30d)
- 344
Description
### Describe the bug
`datafusion-cli` is compiled from the latest main commit 162942016
```sh
DataFusion CLI v50.0.0
> CREATE TABLE orders (
o_orderkey INT,
o_totalprice DECIMAL(15, 2)
);
INSERT INTO orders VALUES (1, 10.00);
SELECT total_spent
FROM (
SELECT
SUM(o_totalprice) AS total_spent,
COUNT(DISTINCT o_orderkey) AS order_count
FROM orders
) t
WHERE total_spent > 0;
Arrow error: Invalid argument error: Invalid comparison operation: Decimal128(35, 2) > Decimal128(25, 2)
```
### To Reproduce
_No response_
### Expected behavior
_No response_
### Additional context
Found by SQLStorm https://github.com/apache/datafusion/issues/17698
Contributor guide
Assessment
This issue has not been assessed yet.