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

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


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

Reply via email to