adarshsanjeev opened a new issue, #13951:
URL: https://github.com/apache/druid/issues/13951
While resolving some test failures, I noticed that there is a small
discrepancy in the sort order for null values. This only occurs if
druid.generic.useDefaultValueForNull is false and there are null values present
in the segment queried, with DESC used as the sort order.
For a query like `SELECT l1, COUNT(*) FROM druid.numfoo GROUP BY l1 ORDER BY
l1 DESC LIMIT 10`. (taken from the unit tests)
MSQ queries return the following:
```
325323L, 1L
7L, 1L
0L, 1L
null, 3L
```
Native queries return the following:
```
null, 3L
325323L, 1L
7L, 1L
0L, 1L
```
MSQ treats null as a minimum value, while native always seems to return it
at the start, irrespective of ASC/DESC. Ideally, we should return the same
results regardless of engine. I am not sure, however, which of these should be
changed. The MSQ handling seems more appropriate to me(treating it as the
smallest key).
--
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]