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

   ### 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
   
   master
   
   ### What's Wrong?
   
   CREATE TABLE `test`.`tb_test1` (
     `dt` date NULL COMMENT '统计日期',
     `code` int(11) NULL
   ) ENGINE=OLAP
   DUPLICATE KEY(`dt`, `code`)
   COMMENT 'OLAP'
   PARTITION BY RANGE(`dt`)
   (PARTITION m202206 VALUES [('2022-06-01'), ('2022-07-01')),
   PARTITION m202207 VALUES [('2022-07-01'), ('2022-08-01')),
   PARTITION m202208 VALUES [('2022-08-01'), ('2022-09-01')),
   PARTITION m202209 VALUES [('2022-09-01'), ('2022-10-01')),
   PARTITION m202210 VALUES [('2022-10-01'), ('2022-11-01')),
   PARTITION m202211 VALUES [('2022-11-01'), ('2022-12-01')),
   PARTITION m202212 VALUES [('2022-12-01'), ('2023-01-01')),
   PARTITION m202301 VALUES [('2023-01-01'), ('2023-02-01')),
   PARTITION m202302 VALUES [('2023-02-01'), ('2023-03-01')),
   PARTITION m202303 VALUES [('2023-03-01'), ('2023-04-01')),
   PARTITION m202304 VALUES [('2023-04-01'), ('2023-05-01')))
   DISTRIBUTED BY HASH(`dt`, `code`) BUCKETS 10
   PROPERTIES (
   "replication_allocation" = "tag.location.default: 1",
   "dynamic_partition.enable" = "true",
   "dynamic_partition.time_unit" = "MONTH",
   "dynamic_partition.time_zone" = "Asia/Shanghai",
   "dynamic_partition.start" = "-2147483648",
   "dynamic_partition.end" = "1",
   "dynamic_partition.prefix" = "m",
   "dynamic_partition.replication_allocation" = "tag.location.default: 1",
   "dynamic_partition.buckets" = "10",
   "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.storage_policy" = "",
   "dynamic_partition.start_day_of_month" = "1",
   "in_memory" = "false",
   "storage_format" = "V2",
   "disable_auto_compaction" = "false"
   );
   
   insert into test.tb_test1 values ('2022-10-01', 123);
   
   
   mysql> select * from tb_test1 where dt = '2022-10-01';
   +------------+------+
   | dt         | code |
   +------------+------+
   | 2022-10-01 |  123 |
   +------------+------+
   
   mysql> select * from tb_test1 where dt = '20221001';
   +------------+------+
   | dt         | code |
   +------------+------+
   | 2022-10-01 |  123 |
   +------------+------+
   
   
   mysql> delete from tb_test1 where dt = '20221001';
   Query OK, 0 rows affected (0.04 sec)
   
   mysql> select * from tb_test1 where dt = '20221001';
   +------------+------+
   | dt         | code |
   +------------+------+
   | 2022-10-01 |  123 |
   +------------+------+
   
   ### What You Expected?
   
   delete successful
   
   ### 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to