haohuaijin opened a new issue, #8386:
URL: https://github.com/apache/arrow-datafusion/issues/8386
### Describe the bug
During work on #8371, @comphead proposed that we can test `partition by
null` and `order by null`
I test this and find `partition by null` and `order by null` will fail in
all windows function(maybe, I'm not test all)
```
❯ CREATE TABLE t1 (a int) AS VALUES (1), (2), (3);
0 rows in set. Query took 0.018 seconds.
❯ select rank() over (partition by null) from t1;
thread 'tokio-runtime-worker' panicked at
/home/hhj/datafusion/datafusion/physical-plan/src/repartition/mod.rs:208:79:
called `Result::unwrap()` on an `Err` value: InvalidArgumentError("must
either specify a row count or at least one column")
Execution error: Expects PARTITION BY expression to be ordered
❯ select rank() over (order by null) from t1;
type_coercion
caused by
Internal error: Cannot run range queries on datatype: Null.
This was likely caused by a bug in DataFusion's code and we would welcome
that you file an bug report in our issue tracker
❯ select sum(a) over (order by null) from t1;
type_coercion
caused by
Internal error: Cannot run range queries on datatype: Null.
This was likely caused by a bug in DataFusion's code and we would welcome
that you file an bug report in our issue tracker
❯ select sum(a) over (partition by null) from t1;
Internal error: All partition by columns should have an ordering.
This was likely caused by a bug in DataFusion's code and we would welcome
that you file an bug report in our issue tracker
```
### To Reproduce
_No response_
### Expected behavior
correct work like duckdb
### Additional context
_No response_
--
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]