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

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no 
similar issues.
   
   
   ### Version
   
   2.0.3
   
   ### What's Wrong?
   
   以下是根据场景进行抽象的描述
   建立聚合模型表:
   `CREATE TABLE test (
       a VARCHAR(64),
       b VARCHAR(64), 
       c VARCHAR(64),
       d BITMAP BITMAP_UNION,
       e BIGINT SUM
   )
   AGGREGATE KEY(a, b, c);`
   物化视图:
   `CREATE MATERIALIZED VIEW mv_test
   AS
   SELECT b, c, bitmap_union(d), sum(e) 
   FROM test
   GROUP by b, c;
   `
   插入数据(省略);
   
   EXPLAIN  查询:
   `EXPLAIN SELECT b, c, bitmap_union(d), sum(e) 
   FROM test
   GROUP by b, c;`
   使用不上物化视图mv_test,原因是有bitmap_union聚合。
   
   以下是真实业务的建表以及视图和explain结果截图:
   基表:
   
![image](https://github.com/apache/doris/assets/30048177/fe61f45f-46b8-47d6-adcb-810d4a411008)
   物化视图:
   
![image](https://github.com/apache/doris/assets/30048177/d7359b48-1729-455e-b704-793f1d6435fd)
   查询explain,带bitmap_union,查询不能命中物化视图,不带即可命中:
   
![image](https://github.com/apache/doris/assets/30048177/a9ae25f0-b808-4b30-9813-68a46d7492d1)
   
![image](https://github.com/apache/doris/assets/30048177/f00e8287-6677-441b-a7e7-5ff45ae3b20e)
   
![image](https://github.com/apache/doris/assets/30048177/d5a4d420-5f98-4ba5-bf52-f85212755c80)
   
![image](https://github.com/apache/doris/assets/30048177/56e04110-5af1-4d53-91d1-1092af2adab0)
   
   
   
   
   
   
   
   ### What You Expected?
   
   查询字段有bitmap_union的字段也能命中物化视图
   
   ### How to Reproduce?
   
   以上
   
   ### Anything Else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] 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