ThomasAWalker opened a new issue, #13566:
URL: https://github.com/apache/datafusion/issues/13566
### Describe the bug
row_number() over (order by column) produces an internal error when the
order by column is a boolean.
### To Reproduce
```select b, row_number() over (order by a) from (select TRUE as a, 1 as
b);```
Produces
```
type_coercion
caused by
Internal error: Cannot run range queries on datatype: Boolean.
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
```
### Expected behavior
Postgres
```
b | row_number
---+------------
1 | 1
```
Duck
```
┌───────┬────────────────────────────────┐
│ b │ row_number() OVER (ORDER BY a) │
│ int32 │ int64 │
├───────┼────────────────────────────────┤
│ 1 │ 1 │
└───────┴────────────────────────────────┘
```
### 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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]