You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/10/20 10:25:34 UTC

[GitHub] [doris] Wang857857 opened a new issue, #13521: BITMAP_INTERSECT函数对于NULL的处理

Wang857857 opened a new issue, #13521:
URL: https://github.com/apache/doris/issues/13521

   SELECT BITMAP_TO_STRING(BITMAP_INTERSECT(user_id)) from ((SELECT TO_BITMAP(1) user_id) union all (SELECT NULL user_id)) t1
   
   输出:1
   
   SELECT BITMAP_TO_STRING(BITMAP_INTERSECT(user_id)) from ((SELECT TO_BITMAP(1) user_id) union all (SELECT BITMAP_EMPTY() user_id)) t1
   
   输出:''


-- 
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@doris.apache.org.apache.org

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


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


[GitHub] [doris] Wang857857 commented on issue #13521: BITMAP_INTERSECT函数对于NULL的处理

Posted by GitBox <gi...@apache.org>.
Wang857857 commented on issue #13521:
URL: https://github.com/apache/doris/issues/13521#issuecomment-1288338827

   > 
   Thank you for your reply.
   
   I use Bitmap to store people who meet certain conditions.
   
   When I want to obtain people who do not meet this condition.
   
   I found this phenomenon in the case of difference sets, which is not what I want
   So I used IFNULL(NULL, BITMAP_EMPTY())
   
   SELECT BITMAP_TO_STRING(BITMAP_INTERSECT(user_id)) from ((SELECT TO_BITMAP(1) user_id) union all (SELECT IFNULL(NULL, BITMAP_EMPTY()) user_id)) t1
   
   Is there a better way to achieve it.
   
   Thanks again for your reply.
   
   
   


-- 
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@doris.apache.org

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


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


[GitHub] [doris] zhangstar333 commented on issue #13521: BITMAP_INTERSECT函数对于NULL的处理

Posted by GitBox <gi...@apache.org>.
zhangstar333 commented on issue #13521:
URL: https://github.com/apache/doris/issues/13521#issuecomment-1286534240

   1.
   Null is skipped, so only to_bitmap(1)
   
   2.
   to_bitmap(1) is different bitmap_empty(), so their intersection is empty


-- 
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@doris.apache.org

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


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


[GitHub] [doris] Wang857857 closed issue #13521: BITMAP_INTERSECT函数对于NULL的处理

Posted by GitBox <gi...@apache.org>.
Wang857857 closed issue #13521: BITMAP_INTERSECT函数对于NULL的处理
URL: https://github.com/apache/doris/issues/13521


-- 
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@doris.apache.org

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


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


[GitHub] [doris] Wang857857 commented on issue #13521: BITMAP_INTERSECT函数对于NULL的处理

Posted by GitBox <gi...@apache.org>.
Wang857857 commented on issue #13521:
URL: https://github.com/apache/doris/issues/13521#issuecomment-1285298365

   Is this a bug or a normal situation?
   If it is normal, why should it be?
   Please let me know


-- 
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@doris.apache.org

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


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