caiconghui opened a new issue #3942:
URL: https://github.com/apache/incubator-doris/issues/3942


   **Describe the bug**
   delete stmt with filter condition delete all data from table on segment v2.
   
   **To Reproduce**
   Steps to reproduce the behavior:
   1. set global default_rowset_type="beta";
   2.   CREATE TABLE `test_beta` (
     `month` datetime NOT NULL,
     `service_name` varchar(100) NOT NULL,
     `cluster_name` varchar(100) NOT NULL
   ) ENGINE=OLAP
   DUPLICATE KEY(`month`, `service_name`, `cluster_name`)
   COMMENT "OLAP"
   PARTITION BY RANGE(`month`)
   (PARTITION p202004 VALUES [('2020-04-01 00:00:00'), ('2020-05-01 00:00:00')))
   DISTRIBUTED BY HASH(`service_name`) BUCKETS 1
   PROPERTIES (
   "replication_num" = "1",
   "in_memory" = "false",
   "storage_format" = "DEFAULT"
   ); 
   3.  insert into test_beta values("2020-04-01 00:00:00", "shop11", "xxxxx"), 
("2020-04-01 00:00:00", "shop12", "11");
   4. delete from test_beta partition p202004 where service_name="shop11" and 
month="2020-04-01 00:00:00";
   5.  mysql> select * from test_beta;
   Empty set (0.02 sec)
       
   **Expected behavior**
   mysql> select * from test_beta;
   +---------------------+--------------+--------------+
   | month               | service_name | cluster_name |
   +---------------------+--------------+--------------+
   | 2020-04-01 00:00:00 | shop12       | 11           |
   +---------------------+--------------+--------------+
   1 row in set (0.01 sec)
   


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

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