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/08/02 06:42:48 UTC

[GitHub] [doris] zhangy5 opened a new issue, #11428: [Bug] [daily]select count with materialized view, result is wrong

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

   ### 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
   
   master
   trunk-27a1911
   
   ### What's Wrong?
   
   CREATE DATABASE test_sys_materialized_view_2_test_create_dup_count_mv_db
   
   CREATE TABLE test_sys_materialized_view_2_test_create_dup_count_mv_db.test_sys_materialized_view_2_test_create_dup_count_mv_tb_dup ( k0 BOOLEAN NOT NULL, k1 TINYINT NOT NULL, k2 SMALLINT NOT NULL, k3 INT NOT NULL, k4 BIGINT NOT NULL, k5 LARGEINT NOT NULL, k6 DECIMAL(9,3) NOT NULL, k7 CHAR(5) NOT NULL, k8 DATE NOT NULL, k9 DATETIME NOT NULL, k10 VARCHAR(20) NOT NULL, k11 DOUBLE NOT NULL, k12 FLOAT NOT NULL )  DISTRIBUTED BY HASH(k0) BUCKETS 10
   
   LOAD LABEL test_sys_materialized_view_2_test_create_dup_count_mv_db.label_02_07_04_27_767951_248931177 ( DATA INFILE("xxx/data/qe/baseall.txt") INTO TABLE `test_sys_materialized_view_2_test_create_dup_count_mv_tb_dup` (`v1`, `v2`, `v3`, `v4`, `v6`, `v7`, `v8`, `v9`, `v10`, `v11`, `v12`) SET(k1=v1, k2=v2, k3=v3, k4=v4, k6=v6, k7=v7, k8=v8, k9=v9, k10=v10, k11=v11, k12=v12, k0=v7, k5=v4*101)) WITH BROKER "xx" ("username"="", "password"="")
   
   CREATE MATERIALIZED VIEW count_mv AS select k0, count(k1), count(k2), count(k3), count(k4), count(k5), count(k6), count(k7), count(k8), count(k9), count(k10), count(k11), count(k12) from test_sys_materialized_view_2_test_create_dup_count_mv_tb_dup group by k0
   
   select k0, count(k1), count(k2), count(k3), count(k4), count(k5), count(k6), count(k7), count(k8), count(k9), count(k10), count(k11), count(k12) from test_sys_materialized_view_2_test_create_dup_count_mv_tb_dup group by k0
   
   this query result is wrong
   mysql> select k0, count(k1), count(k2), count(k3), count(k4), count(k5), count(k6), count(k7), count(k8), count(k9), count(k10), count(k11), count(k12) from test_sys_materialized_view_2_test_create_dup_count_mv_tb_dup group by k0;
   +------+-------------+-------------+-------------+-------------+-------------+-------------+-------------+-------------+-------------+--------------+--------------+--------------+
   | k0   | count(`k1`) | count(`k2`) | count(`k3`) | count(`k4`) | count(`k5`) | count(`k6`) | count(`k7`) | count(`k8`) | count(`k9`) | count(`k10`) | count(`k11`) | count(`k12`) |
   +------+-------------+-------------+-------------+-------------+-------------+-------------+-------------+-------------+-------------+--------------+--------------+--------------+
   |    0 |           0 |           0 |           0 |           0 |           0 |           0 |           0 |           0 |           0 |            0 |            0 |            0 |
   |    1 |           0 |           0 |           0 |           0 |           0 |           0 |           0 |           0 |           0 |            0 |            0 |            0 |
   +------+-------------+-------------+-------------+-------------+-------------+-------------+-------------+-------------+-------------+--------------+--------------+--------------+
   2 rows in set (0.04 sec)
   
   ### What You Expected?
   
   expect
   +------+-------------+-------------+-------------+-------------+-------------+-------------+-------------+-------------+-------------+--------------+--------------+--------------+
   | k0   | count(`k1`) | count(`k2`) | count(`k3`) | count(`k4`) | count(`k5`) | count(`k6`) | count(`k7`) | count(`k8`) | count(`k9`) | count(`k10`) | count(`k11`) | count(`k12`) |
   +------+-------------+-------------+-------------+-------------+-------------+-------------+-------------+-------------+-------------+--------------+--------------+--------------+
   |    1 |           7 |           7 |           7 |           7 |           7 |           7 |           7 |           7 |           7 |            7 |            7 |            7 |
   |    0 |           8 |           8 |           8 |           8 |           8 |           8 |           8 |           8 |           8 |            8 |            8 |            8 |
   +------+-------------+-------------+-------------+-------------+-------------+-------------+-------------+-------------+-------------+--------------+--------------+--------------+
   
   ### How to Reproduce?
   
   _No response_
   
   ### 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-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] zhangy5 closed issue #11428: [Bug] [daily]select count with materialized view, result is wrong

Posted by GitBox <gi...@apache.org>.
zhangy5 closed issue #11428: [Bug] [daily]select count with materialized view, result is wrong
URL: https://github.com/apache/doris/issues/11428


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