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:25:13 UTC

[GitHub] [druid] adarshsanjeev opened a new issue, #13950: Discrepancy with null in APPROX_COUNT_DISTINCT_BUILTIN between MSQ and native

adarshsanjeev opened a new issue, #13950:
URL: https://github.com/apache/druid/issues/13950

   While resolving some test failures, I noticed that there is a small discrepancy in how APPROX_COUNT_DISTINCT_BUILTIN works. This only occurs if `druid.generic.useDefaultValueForNull` is false and there are null values present in the segment queried.
   
   For a datasource `foo` which contains the following values in dim2
   
   ```
   "a"
   null
   ""
   "a"
   "abc"
   null
   ```
   On running a query `SELECT dim2, APPROX_COUNT_DISTINCT_BUILTIN(dim2) FROM druid.foo GROUP BY 1`, we get the following results:
   Native:
   ```
   null, 0L
   "", 1L
   "a", 1L
   "abc", 1L
   ```
   MSQ:
   ```
   null, 0L
   "", 0L
   "a", 1L
   "abc", 1L
   ```
   MSQ seems to ignore the empty string in the same way as null, while native seems to have the correct behaviour. A change might need to be made to bring MSQ in line.


-- 
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 in APPROX_COUNT_DISTINCT_BUILTIN between MSQ and native (druid)

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

   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


Re: [I] Discrepancy with null in APPROX_COUNT_DISTINCT_BUILTIN between MSQ and native (druid)

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


-- 
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


[GitHub] [druid] LakshSingla commented on issue #13950: Discrepancy with null in APPROX_COUNT_DISTINCT_BUILTIN between MSQ and native

Posted by "LakshSingla (via GitHub)" <gi...@apache.org>.
LakshSingla commented on issue #13950:
URL: https://github.com/apache/druid/issues/13950#issuecomment-1501256791

   https://github.com/apache/druid/pull/14020 resolves the issue, and https://github.com/apache/druid/pull/14046 ensures that the types of results match. I think we can close out this issue. 


-- 
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


[GitHub] [druid] gianm commented on issue #13950: Discrepancy with null in APPROX_COUNT_DISTINCT_BUILTIN between MSQ and native

Posted by "gianm (via GitHub)" <gi...@apache.org>.
gianm commented on issue #13950:
URL: https://github.com/apache/druid/issues/13950#issuecomment-1507804594

   In working on #14046, I find that this is still an issue, so I'm reopening it. Let me know if I missed something. I added a test case in #14085 that illustrates what I believe the cause is. (An issue with the HyperLogLogCollector when it runs on empty strings, which can get passed into it in SQL-compatible mode.)


-- 
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


[GitHub] [druid] LakshSingla closed issue #13950: Discrepancy with null in APPROX_COUNT_DISTINCT_BUILTIN between MSQ and native

Posted by "LakshSingla (via GitHub)" <gi...@apache.org>.
LakshSingla closed issue #13950: Discrepancy with null in APPROX_COUNT_DISTINCT_BUILTIN between MSQ and native
URL: https://github.com/apache/druid/issues/13950


-- 
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 in APPROX_COUNT_DISTINCT_BUILTIN between MSQ and native (druid)

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

   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