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/06/21 14:06:10 UTC

[GitHub] [doris] yangzhg opened a new issue, #10317: [Bug] result may not write when enable partition cache

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

   ### 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?
   
   result may not write when enable partition cache
   
   
   ### What You Expected?
   
   result is right
   
   ### How to Reproduce?
   
   ```
   MySQL [test]> CREATE TABLE `test` (
     `event_day` date NOT NULL COMMENT "日期",
     `quota_id` int(11) NOT NULL COMMENT "指标id",
     `group0` varchar(1024) NOT NULL DEFAULT "" COMMENT "",
     `group1` varchar(256) NOT NULL DEFAULT "" COMMENT "group1",
     `group2` varchar(256) NOT NULL DEFAULT "" COMMENT "group2",
     `group3` varchar(256) NOT NULL DEFAULT "" COMMENT "group3",
     `group4` varchar(256) NOT NULL DEFAULT "" COMMENT "group4",
     `group5` varchar(256) NOT NULL DEFAULT "" COMMENT "group5",
     `group6` varchar(256) NOT NULL DEFAULT "" COMMENT "group6",
     `group7` varchar(256) NOT NULL DEFAULT "" COMMENT "group7",
     `group8` varchar(256) NOT NULL DEFAULT "" COMMENT "group8",
     `quota_value` varchar(256) NOT NULL DEFAULT "" COMMENT "指标值",
     `quota_des` varchar(256) NOT NULL DEFAULT "" COMMENT "指标描述",
     `quota_type` varchar(256) NOT NULL DEFAULT "" COMMENT "指标类型"
   ) ENGINE=OLAP
   DUPLICATE KEY(`event_day`, `quota_id`, `group0`, `group1`, `group2`, `group3`, `group4`, `group5`, `group6`, `group7`, `group8`, `quota_value`, `quota_des`, `quota_type`)
   COMMENT "OLAP"
   PARTITION BY RANGE(`event_day`)
   (PARTITION p201912 VALUES [('1900-01-01'), ('2020-01-01')),
   PARTITION p202001 VALUES [('2020-01-01'), ('2020-02-01')),
   PARTITION p202002 VALUES [('2020-02-01'), ('2020-03-01')),
   PARTITION p202003 VALUES [('2020-03-01'), ('2020-04-01')),
   PARTITION p202004 VALUES [('2020-04-01'), ('2020-05-01')),
   PARTITION p202005 VALUES [('2020-05-01'), ('2020-06-01')),
   PARTITION p202006 VALUES [('2020-06-01'), ('2020-07-01')),
   PARTITION p202007 VALUES [('2020-07-01'), ('2020-08-01')),
   PARTITION p202008 VALUES [('2020-08-01'), ('2020-09-01')),
   PARTITION p202009 VALUES [('2020-09-01'), ('2020-10-01')),
   PARTITION p202010 VALUES [('2020-10-01'), ('2020-11-01')),
   PARTITION p202011 VALUES [('2020-11-01'), ('2020-12-01')),
   PARTITION p202012 VALUES [('2020-12-01'), ('2021-01-01')),
   PARTITION p202101 VALUES [('2021-01-01'), ('2021-02-01')),
   PARTITION p202102 VALUES [('2021-02-01'), ('2021-03-01')),
   PARTITION p202103 VALUES [('2021-03-01'), ('2021-04-01')),
   PARTITION p202104 VALUES [('2021-04-01'), ('2021-05-01')),
   PARTITION p202105 VALUES [('2021-05-01'), ('2021-06-01')),
   PARTITION p202106 VALUES [('2021-06-01'), ('2021-07-01')),
   PARTITION p202107 VALUES [('2021-07-01'), ('2021-08-01')),
   PARTITION p202108 VALUES [('2021-08-01'), ('2021-09-01')),
   PARTITION p202109 VALUES [('2021-09-01'), ('2021-10-01')),
   PARTITION p202110 VALUES [('2021-10-01'), ('2021-11-01')),
   PARTITION p202111 VALUES [('2021-11-01'), ('2021-12-01')),
   PARTITION p202112 VALUES [('2021-12-01'), ('2022-01-01')),
   PARTITION p202201 VALUES [('2022-01-01'), ('2022-02-01')),
   PARTITION p202202 VALUES [('2022-02-01'), ('2022-03-01')),
   PARTITION p202203 VALUES [('2022-03-01'), ('2022-04-01')),
   PARTITION p202204 VALUES [('2022-04-01'), ('2022-05-01')),
   PARTITION p202205 VALUES [('2022-05-01'), ('2022-06-01')),
   PARTITION p202206 VALUES [('2022-06-01'), ('2022-07-01')),
   PARTITION p202207 VALUES [('2022-07-01'), ('2022-08-01')),
   PARTITION p202208 VALUES [('2022-08-01'), ('2022-09-01')),
   PARTITION p202209 VALUES [('2022-09-01'), ('2022-10-01')))
   DISTRIBUTED BY HASH(`event_day`, `quota_id`) BUCKETS 32
   PROPERTIES (
   "replication_allocation" = "tag.location.default: 3",
   "dynamic_partition.enable" = "false",
   "dynamic_partition.time_unit" = "MONTH",
   "dynamic_partition.time_zone" = "Asia/Shanghai",
   "dynamic_partition.start" = "-2147483648",
   "dynamic_partition.end" = "3",
   "dynamic_partition.prefix" = "p",
   "dynamic_partition.replication_allocation" = "tag.location.default: 3",
   "dynamic_partition.buckets" = "32",
   "dynamic_partition.create_history_partition" = "false",
   "dynamic_partition.history_partition_num" = "-1",
   "dynamic_partition.hot_partition_num" = "0",
   "dynamic_partition.reserved_history_periods" = "NULL",
   "dynamic_partition.start_day_of_month" = "1",
   "in_memory" = "false",
   "storage_format" = "V2"
   );
   
   insert ....
   
   MySQL [test]> set enable_partition_cache=true;
   Query OK, 0 rows affected (0.01 sec)
   
   MySQL [test]> select event_day,sum(cast(quota_value as int)) as total_pv from test where event_day between '2022-05-28' and '2022-06-30' and quota_id = 85  group by event_day;
   +------------+----------+
   | event_day  | total_pv |
   +------------+----------+
   | 2022-05-31 |        0 |
   | 2022-05-28 |        0 |
   | 2022-06-18 |        0 |
   | 2022-06-17 |        0 |
   | 2022-06-15 |        0 |
   | 2022-06-06 |        0 |
   | 2022-06-09 |        0 |
   | 2022-06-10 |        0 |
   | 2022-06-12 |        0 |
   | 2022-06-03 |        0 |
   | 2022-06-07 |        0 |
   | 2022-06-13 |        0 |
   | 2022-06-14 |        0 |
   | 2022-06-08 |        0 |
   | 2022-06-11 |        0 |
   | 2022-06-19 |        0 |
   | 2022-06-16 |        0 |
   | 2022-06-05 |        0 |
   | 2022-06-04 |        0 |
   | 2022-06-01 |        0 |
   | 2022-06-02 |        0 |
   | 2022-05-30 |        0 |
   | 2022-05-29 |        0 |
   +------------+----------+
   23 rows in set (0.08 sec)
   
   MySQL [test]> select event_day,sum(cast(quota_value as int)) as total_pv from test where event_day between '2022-05-28' and '2022-06-30' and quota_id = 85  group by event_day;
   +------------+----------+
   | event_day  | total_pv |
   +------------+----------+
   | 2022-05-28 |        0 |
   | 2022-05-29 |        0 |
   | 2022-05-30 |        0 |
   | 2022-05-31 |        0 |
   | 2022-06-02 |        0 |
   | 2022-06-03 |        0 |
   | 2022-06-04 |        0 |
   | 2022-06-05 |        0 |
   | 2022-06-06 |        0 |
   | 2022-06-07 |        0 |
   | 2022-06-08 |        0 |
   | 2022-06-09 |        0 |
   | 2022-06-10 |        0 |
   | 2022-06-11 |        0 |
   | 2022-06-12 |        0 |
   | 2022-06-13 |        0 |
   | 2022-06-14 |        0 |
   | 2022-06-15 |        0 |
   | 2022-06-16 |        0 |
   | 2022-06-17 |        0 |
   | 2022-06-18 |        0 |
   | 2022-06-19 |        0 |
   | 2022-06-15 |        0 |
   | 2022-06-13 |        0 |
   | 2022-06-14 |        0 |
   | 2022-06-18 |        0 |
   | 2022-06-17 |        0 |
   | 2022-06-06 |        0 |
   | 2022-06-09 |        0 |
   | 2022-06-10 |        0 |
   | 2022-06-12 |        0 |
   | 2022-06-07 |        0 |
   | 2022-06-03 |        0 |
   | 2022-06-08 |        0 |
   | 2022-06-11 |        0 |
   | 2022-06-19 |        0 |
   | 2022-06-16 |        0 |
   | 2022-06-05 |        0 |
   | 2022-06-04 |        0 |
   | 2022-06-01 |        0 |
   | 2022-06-02 |        0 |
   +------------+----------+
   41 rows in set (3 min 12.35 sec)
   ```
   
   ### 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] morningman closed issue #10317: [Bug] result may not write when enable partition cache

Posted by GitBox <gi...@apache.org>.
morningman closed issue #10317: [Bug] result may not write when enable partition cache
URL: https://github.com/apache/doris/issues/10317


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