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 03:21:14 UTC

[GitHub] [doris] yangzhg opened a new issue, #13502: [Bug] MV with bitmap union column will cause select count(distinct) result is incorrect

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

   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/incubator-doris/issues?q=is%3Aissue) and found no similar issues.
   
   
   ### Version
   
   all
   
   ### What's Wrong?
   
   ```
   create table test  (k1 BOOLEAN NOT NULL, k2 TINYINT NOT NULL, k3 SMALLINT NOT NULL) DISTRIBUTED BY HASH(k1) BUCKETS 1 properties("replication_num"="1");
   CREATE MATERIALIZED VIEW test_neg as select k1,bitmap_union(to_bitmap(k2)), bitmap_union(to_bitmap(k3)) from test group by k1;
   insert into test values(1,-1,-1);
   insert into test values(1,1,1);
   insert into test values(1,-1,-1);
   insert into test values(1,1,1);
   ```
   
   ```
   MySQL [test]> select * from test;
   +------+------+------+
   | k1   | k2   | k3   |
   +------+------+------+
   |    1 |   -1 |   -1 |
   |    1 |    1 |    1 |
   |    0 |   -1 |   -1 |
   |    0 |    1 |    1 |
   +------+------+------+
   4 rows in set (0.015 sec)
   
   MySQL [test]> select count(distinct k2), count(distinct k3) from test1 group by k1;
   +----------------------+----------------------+
   | count(DISTINCT `k2`) | count(DISTINCT `k3`) |
   +----------------------+----------------------+
   |                    1 |                    1 |
   |                    1 |                    1 |
   +----------------------+----------------------+
   2 rows in set (0.206 sec)
   ```
   
   ### What You Expected?
   
   ```
   MySQL [test]> select count(distinct k2), count(distinct k3) from test1 group by k1;
   +----------------------+----------------------+
   | count(DISTINCT `k2`) | count(DISTINCT `k3`) |
   +----------------------+----------------------+
   |                    2 |                    2 |
   |                    2 |                    2 |
   +----------------------+----------------------+
   2 rows in set (0.206 sec)
   ```
   
   ### How to Reproduce?
   
   _No response_
   
   ### Anything Else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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] cambyzju closed issue #13502: [Bug] MV with bitmap union column will cause select count(distinct) result is incorrect

Posted by GitBox <gi...@apache.org>.
cambyzju closed issue #13502: [Bug] MV with bitmap union column will cause select count(distinct) result is incorrect
URL: https://github.com/apache/doris/issues/13502


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