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


   **Is your feature request related to a problem? Please describe.**
   Now, delete stament doesn't support inPredicate.
   
   **Describe the solution you'd like**
   Support inPredicate in delete statement.
   mysql> SELECT * FROM test_alpha;
   +---------------------+--------------+--------------+
   | month               | service_name | cluster_name |
   +---------------------+--------------+--------------+
   | 2020-04-01 00:00:00 | shop NN1 8   | xxxxx        |
   | 2020-04-01 00:00:00 | shop NN1 8   | xxxxx        |
   | 2020-04-01 00:00:00 | shop21       | xxxxx        |
   | 2020-04-01 00:00:00 | shop22       | xxxxx        |
   +---------------------+--------------+--------------+
   4 rows in set (0.01 sec)
   
   mysql> SELECT * FROM test_alpha;
   +---------------------+--------------+--------------+
   | month               | service_name | cluster_name |
   +---------------------+--------------+--------------+
   | 2020-04-01 00:00:00 | shop NN1 8   | xxxxx        |
   | 2020-04-01 00:00:00 | shop NN1 8   | xxxxx        |
   | 2020-04-01 00:00:00 | shop21       | xxxxx        |
   | 2020-04-01 00:00:00 | shop22       | xxxxx        |
   +---------------------+--------------+--------------+
   4 rows in set (0.01 sec)
   
   mysql> delete from test_alpha partition p202004 where service_name not in 
("shop21", "shop22");
   Query OK, 0 rows affected (0.13 sec)
   {'label':'delete_6b3f32b8-18d2-4676-af72-64951de3a3cb', 'status':'VISIBLE', 
'txnId':'10'}
   
   mysql> delete from test_beta partition p202004 where service_name not in 
("shop21", "shop22");
   Query OK, 0 rows affected (0.14 sec)
   {'label':'delete_54647f82-cabd-4f5d-9e56-efc56c23ee9c', 'status':'VISIBLE', 
'txnId':'12'}
   
   mysql> select * from test_beta;
   +---------------------+--------------+--------------+
   | month               | service_name | cluster_name |
   +---------------------+--------------+--------------+
   | 2020-04-01 00:00:00 | shop21       | xxxxx        |
   | 2020-04-01 00:00:00 | shop22       | xxxxx        |
   +---------------------+--------------+--------------+
   2 rows in set (0.01 sec)
   
   mysql> select * from test_alpha;
   +---------------------+--------------+--------------+
   | month               | service_name | cluster_name |
   +---------------------+--------------+--------------+
   | 2020-04-01 00:00:00 | shop21       | xxxxx        |
   | 2020-04-01 00:00:00 | shop22       | xxxxx        |
   +---------------------+--------------+--------------+
   2 rows 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