You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by "adarshsanjeev (via GitHub)" <gi...@apache.org> on 2023/03/20 04:44:59 UTC

[GitHub] [druid] adarshsanjeev opened a new issue, #13951: Discrepancy with null while sorting based on null values between MSQ and native

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: commits-unsubscribe@druid.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [I] Discrepancy with null while sorting based on null values between MSQ and native (druid)

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #13951:
URL: https://github.com/apache/druid/issues/13951#issuecomment-1984824675

   This issue has been closed due to lack of activity. If you think that
   is incorrect, or the issue requires additional review, you can revive the issue at
   any time.


-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [I] Discrepancy with null while sorting based on null values between MSQ and native (druid)

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #13951: Discrepancy with null while sorting based on null values between MSQ and native
URL: https://github.com/apache/druid/issues/13951


-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [I] Discrepancy with null while sorting based on null values between MSQ and native (druid)

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #13951:
URL: https://github.com/apache/druid/issues/13951#issuecomment-1935131236

   This issue has been marked as stale due to 280 days of inactivity.
   It will be closed in 4 weeks if no further activity occurs. If this issue is still
   relevant, please simply write any comment. Even if closed, you can still revive the
   issue at any time or discuss it on the dev@druid.apache.org list.
   Thank you for your contributions.


-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org