Closed
Description
Describe the bug
This doesn't work but should:
DataFusion CLI v20.0.0
❯ create table temp as with orders as (
select 1 as o_custkey
)
SELECT RANK() OVER (PARTITION BY o_custkey)
FROM orders;
Error during planning: Mismatch between schema and batches
To Reproduce
See above
Expected behavior
This should not throw the mismatch error
Additional context
http://sqlfiddle.com/#!17/1d310/1
Note: if I slap round(...) around the window expression, it begins to work:
DataFusion CLI v20.0.0
❯ create table temp as with orders as (
select 1 as o_custkey
)
SELECT round(RANK() OVER (PARTITION BY o_custkey), 5)
FROM orders;
0 rows in set. Query took 0.012 seconds.