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 2020/04/16 08:56:54 UTC

[GitHub] [incubator-doris] xy720 opened a new pull request #3335: [ISSUE #3190]Add documents for delete simplifly

xy720 opened a new pull request #3335: [ISSUE #3190]Add documents for delete simplifly
URL: https://github.com/apache/incubator-doris/pull/3335
 
 
   Issue #3190
   Add docs for delete simplify

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] xy720 commented on a change in pull request #3335: [ISSUE #3190]Add documents for delete simplifly

Posted by GitBox <gi...@apache.org>.
xy720 commented on a change in pull request #3335: [ISSUE #3190]Add documents for delete simplifly
URL: https://github.com/apache/incubator-doris/pull/3335#discussion_r409779220
 
 

 ##########
 File path: docs/documentation/cn/administrator-guide/load-data/delete-manual.md
 ##########
 @@ -0,0 +1,178 @@
+<!-- 
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+#Delete
+
+Delete不同于其他导入方式,它是一个同步过程。和Insert into相似,所有的Delete操作在Doris中是一个独立的导入作业,一般Delete语句需要指定表和分区以及删除的条件来涮选要删除的数据,并将会同时删除base表和rollup表的数据。
+
+##语法
+
+主要的Delete语法如下:
+
+```
+DELETE FROM table_name [PARTITION partition_name]
+        WHERE
+        column_name1 op value[ AND column_name2 op value ...];
 
 Review comment:
   Not supported now. I 'll consider to add this support later.
   And I fixed this document to add some note about "in value list"

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] xy720 commented on a change in pull request #3335: [ISSUE #3190]Add documents for delete simplifly

Posted by GitBox <gi...@apache.org>.
xy720 commented on a change in pull request #3335: [ISSUE #3190]Add documents for delete simplifly
URL: https://github.com/apache/incubator-doris/pull/3335#discussion_r409787471
 
 

 ##########
 File path: docs/documentation/cn/administrator-guide/load-data/delete-manual.md
 ##########
 @@ -0,0 +1,178 @@
+<!-- 
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+#Delete
+
+Delete不同于其他导入方式,它是一个同步过程。和Insert into相似,所有的Delete操作在Doris中是一个独立的导入作业,一般Delete语句需要指定表和分区以及删除的条件来涮选要删除的数据,并将会同时删除base表和rollup表的数据。
 
 Review comment:
   fix it

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] xy720 commented on a change in pull request #3335: [ISSUE #3190]Add documents for delete simplifly

Posted by GitBox <gi...@apache.org>.
xy720 commented on a change in pull request #3335: [ISSUE #3190]Add documents for delete simplifly
URL: https://github.com/apache/incubator-doris/pull/3335#discussion_r409789867
 
 

 ##########
 File path: docs/documentation/cn/administrator-guide/load-data/delete-manual.md
 ##########
 @@ -0,0 +1,178 @@
+<!-- 
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+#Delete
+
+Delete不同于其他导入方式,它是一个同步过程。和Insert into相似,所有的Delete操作在Doris中是一个独立的导入作业,一般Delete语句需要指定表和分区以及删除的条件来涮选要删除的数据,并将会同时删除base表和rollup表的数据。
+
+##语法
+
+主要的Delete语法如下:
+
+```
+DELETE FROM table_name [PARTITION partition_name]
+        WHERE
+        column_name1 op value[ AND column_name2 op value ...];
+```
+
+示例1:
+
+```
+DELETE FROM my_table PARTITION p1
+        WHERE k1 = 3;
+```
+
+示例2:
+
+```
+DELETE FROM my_table PARTITION p1
+        WHERE k1 < 3 AND k2 = "abc";
+```
+
+下面介绍删除语句中使用到的参数:
+
+* PARTITION
+	
+	Delete语句的目标分区,若未指定,则此表必须为单分区表,否则无法delete
+
+* WHERE
+	
+	Delete语句的条件语句,所有删除语句都必须指定WHERE语句
+
+说明:
+
+1. `Where`语句中的op的类型可包括`=,>,<,>=,<=,!=`
+2. `Where`语句中的列只能是`key`列
+3.  当选定的`key`列不存在某个rollup表内时,无法进行delete
+4.  条件语句中各个条件只能是`and`关系,如希望达成`or`可将条件分别写入两个delete语句中
+5.  如果指定表为RANGE分区表,则必须指定 `PARTITION`。如果是单分区表,可以不指定。
+6.  不同于Insert into命令,delete不能手动指定`label`,有关label的概念可以查看[Insert Into文档] (./insert-into-manual.md)
+
+##返回结果
+
+Delete命令是一个SQL命令,返回结果是同步的,分为以下几种:
 
 Review comment:
   我已经在文档补充介绍了一下commit和publish的关系

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] xy720 commented on a change in pull request #3335: [ISSUE #3190]Add documents for delete simplifly

Posted by GitBox <gi...@apache.org>.
xy720 commented on a change in pull request #3335: [ISSUE #3190]Add documents for delete simplifly
URL: https://github.com/apache/incubator-doris/pull/3335#discussion_r409789052
 
 

 ##########
 File path: docs/documentation/cn/administrator-guide/load-data/delete-manual.md
 ##########
 @@ -0,0 +1,178 @@
+<!-- 
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+#Delete
+
+Delete不同于其他导入方式,它是一个同步过程。和Insert into相似,所有的Delete操作在Doris中是一个独立的导入作业,一般Delete语句需要指定表和分区以及删除的条件来涮选要删除的数据,并将会同时删除base表和rollup表的数据。
+
+##语法
+
+主要的Delete语法如下:
+
+```
+DELETE FROM table_name [PARTITION partition_name]
+        WHERE
+        column_name1 op value[ AND column_name2 op value ...];
+```
+
+示例1:
+
+```
+DELETE FROM my_table PARTITION p1
+        WHERE k1 = 3;
+```
+
+示例2:
+
+```
+DELETE FROM my_table PARTITION p1
+        WHERE k1 < 3 AND k2 = "abc";
+```
+
+下面介绍删除语句中使用到的参数:
+
+* PARTITION
+	
+	Delete语句的目标分区,若未指定,则此表必须为单分区表,否则无法delete
+
+* WHERE
+	
+	Delete语句的条件语句,所有删除语句都必须指定WHERE语句
+
+说明:
+
+1. `Where`语句中的op的类型可包括`=,>,<,>=,<=,!=`
+2. `Where`语句中的列只能是`key`列
+3.  当选定的`key`列不存在某个rollup表内时,无法进行delete
+4.  条件语句中各个条件只能是`and`关系,如希望达成`or`可将条件分别写入两个delete语句中
+5.  如果指定表为RANGE分区表,则必须指定 `PARTITION`。如果是单分区表,可以不指定。
+6.  不同于Insert into命令,delete不能手动指定`label`,有关label的概念可以查看[Insert Into文档] (./insert-into-manual.md)
+
+##返回结果
+
+Delete命令是一个SQL命令,返回结果是同步的,分为以下几种:
 
 Review comment:
   Doris的事务提交分为两步:提交和发布版本,具体方法可以看GlobalTransaction里的commitTransactionAndPublish。
   只有完成了第二步,结果才对用户是可见的。但如果第一步提交成功了,那么其实就可以认为最终一定会发布成功,而Doris会尝试在提交完后等待发布版本一段时间,如果超时后即使发布版本仍未完成,也会优先返回给用户结果,提示用户提交已经完成但未可见。

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] xy720 commented on a change in pull request #3335: [ISSUE #3190]Add documents for delete simplifly

Posted by GitBox <gi...@apache.org>.
xy720 commented on a change in pull request #3335: [ISSUE #3190]Add documents for delete simplifly
URL: https://github.com/apache/incubator-doris/pull/3335#discussion_r409789052
 
 

 ##########
 File path: docs/documentation/cn/administrator-guide/load-data/delete-manual.md
 ##########
 @@ -0,0 +1,178 @@
+<!-- 
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+#Delete
+
+Delete不同于其他导入方式,它是一个同步过程。和Insert into相似,所有的Delete操作在Doris中是一个独立的导入作业,一般Delete语句需要指定表和分区以及删除的条件来涮选要删除的数据,并将会同时删除base表和rollup表的数据。
+
+##语法
+
+主要的Delete语法如下:
+
+```
+DELETE FROM table_name [PARTITION partition_name]
+        WHERE
+        column_name1 op value[ AND column_name2 op value ...];
+```
+
+示例1:
+
+```
+DELETE FROM my_table PARTITION p1
+        WHERE k1 = 3;
+```
+
+示例2:
+
+```
+DELETE FROM my_table PARTITION p1
+        WHERE k1 < 3 AND k2 = "abc";
+```
+
+下面介绍删除语句中使用到的参数:
+
+* PARTITION
+	
+	Delete语句的目标分区,若未指定,则此表必须为单分区表,否则无法delete
+
+* WHERE
+	
+	Delete语句的条件语句,所有删除语句都必须指定WHERE语句
+
+说明:
+
+1. `Where`语句中的op的类型可包括`=,>,<,>=,<=,!=`
+2. `Where`语句中的列只能是`key`列
+3.  当选定的`key`列不存在某个rollup表内时,无法进行delete
+4.  条件语句中各个条件只能是`and`关系,如希望达成`or`可将条件分别写入两个delete语句中
+5.  如果指定表为RANGE分区表,则必须指定 `PARTITION`。如果是单分区表,可以不指定。
+6.  不同于Insert into命令,delete不能手动指定`label`,有关label的概念可以查看[Insert Into文档] (./insert-into-manual.md)
+
+##返回结果
+
+Delete命令是一个SQL命令,返回结果是同步的,分为以下几种:
 
 Review comment:
   Doris的事务提交分为两步:提交和发布版本,具体方法可以看GlobalTransaction里的commitTransactionAndPublish,而pubish version步骤交由独立线程publishDaemon完成。
   只有完成了第二步,结果才对用户是可见的。但如果第一步提交成功了,那么其实就可以认为最终一定会发布成功,而Doris会尝试在提交完后等待发布版本一段时间,如果超时后即使发布版本仍未完成,也会优先返回给用户结果,提示用户提交已经完成但未可见。

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] wutiangan commented on a change in pull request #3335: [ISSUE #3190]Add documents for delete simplifly

Posted by GitBox <gi...@apache.org>.
wutiangan commented on a change in pull request #3335: [ISSUE #3190]Add documents for delete simplifly
URL: https://github.com/apache/incubator-doris/pull/3335#discussion_r409402215
 
 

 ##########
 File path: docs/documentation/cn/administrator-guide/load-data/delete-manual.md
 ##########
 @@ -0,0 +1,178 @@
+<!-- 
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+#Delete
+
+Delete不同于其他导入方式,它是一个同步过程。和Insert into相似,所有的Delete操作在Doris中是一个独立的导入作业,一般Delete语句需要指定表和分区以及删除的条件来涮选要删除的数据,并将会同时删除base表和rollup表的数据。
+
+##语法
+
+主要的Delete语法如下:
+
+```
+DELETE FROM table_name [PARTITION partition_name]
+        WHERE
+        column_name1 op value[ AND column_name2 op value ...];
 
 Review comment:
   if support "in value list"? for example, where key1 in (1,2,3)

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] kangkaisen merged pull request #3335: [ISSUE #3190]Add documents for delete simplifly

Posted by GitBox <gi...@apache.org>.
kangkaisen merged pull request #3335: [ISSUE #3190]Add documents for delete simplifly
URL: https://github.com/apache/incubator-doris/pull/3335
 
 
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] xy720 commented on a change in pull request #3335: [ISSUE #3190]Add documents for delete simplifly

Posted by GitBox <gi...@apache.org>.
xy720 commented on a change in pull request #3335: [ISSUE #3190]Add documents for delete simplifly
URL: https://github.com/apache/incubator-doris/pull/3335#discussion_r409789052
 
 

 ##########
 File path: docs/documentation/cn/administrator-guide/load-data/delete-manual.md
 ##########
 @@ -0,0 +1,178 @@
+<!-- 
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+#Delete
+
+Delete不同于其他导入方式,它是一个同步过程。和Insert into相似,所有的Delete操作在Doris中是一个独立的导入作业,一般Delete语句需要指定表和分区以及删除的条件来涮选要删除的数据,并将会同时删除base表和rollup表的数据。
+
+##语法
+
+主要的Delete语法如下:
+
+```
+DELETE FROM table_name [PARTITION partition_name]
+        WHERE
+        column_name1 op value[ AND column_name2 op value ...];
+```
+
+示例1:
+
+```
+DELETE FROM my_table PARTITION p1
+        WHERE k1 = 3;
+```
+
+示例2:
+
+```
+DELETE FROM my_table PARTITION p1
+        WHERE k1 < 3 AND k2 = "abc";
+```
+
+下面介绍删除语句中使用到的参数:
+
+* PARTITION
+	
+	Delete语句的目标分区,若未指定,则此表必须为单分区表,否则无法delete
+
+* WHERE
+	
+	Delete语句的条件语句,所有删除语句都必须指定WHERE语句
+
+说明:
+
+1. `Where`语句中的op的类型可包括`=,>,<,>=,<=,!=`
+2. `Where`语句中的列只能是`key`列
+3.  当选定的`key`列不存在某个rollup表内时,无法进行delete
+4.  条件语句中各个条件只能是`and`关系,如希望达成`or`可将条件分别写入两个delete语句中
+5.  如果指定表为RANGE分区表,则必须指定 `PARTITION`。如果是单分区表,可以不指定。
+6.  不同于Insert into命令,delete不能手动指定`label`,有关label的概念可以查看[Insert Into文档] (./insert-into-manual.md)
+
+##返回结果
+
+Delete命令是一个SQL命令,返回结果是同步的,分为以下几种:
 
 Review comment:
   Doris的事务提交分为两步:提交和发布版本,具体方法可以看GlobalTransaction里的commitTransactionAndPublish,而pubish version步骤交由独立线程publishVersionDaemon完成。
   只有完成了第二步,结果才对用户是可见的。但如果第一步提交成功了,那么其实就可以认为最终一定会发布成功,而Doris会尝试在提交完后等待发布版本一段时间,如果超时后即使发布版本仍未完成,也会优先返回给用户结果,提示用户提交已经完成但未可见。

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] wutiangan commented on a change in pull request #3335: [ISSUE #3190]Add documents for delete simplifly

Posted by GitBox <gi...@apache.org>.
wutiangan commented on a change in pull request #3335: [ISSUE #3190]Add documents for delete simplifly
URL: https://github.com/apache/incubator-doris/pull/3335#discussion_r409401349
 
 

 ##########
 File path: docs/documentation/cn/administrator-guide/load-data/delete-manual.md
 ##########
 @@ -0,0 +1,178 @@
+<!-- 
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+#Delete
+
+Delete不同于其他导入方式,它是一个同步过程。和Insert into相似,所有的Delete操作在Doris中是一个独立的导入作业,一般Delete语句需要指定表和分区以及删除的条件来涮选要删除的数据,并将会同时删除base表和rollup表的数据。
 
 Review comment:
   涮选?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] wutiangan commented on a change in pull request #3335: [ISSUE #3190]Add documents for delete simplifly

Posted by GitBox <gi...@apache.org>.
wutiangan commented on a change in pull request #3335: [ISSUE #3190]Add documents for delete simplifly
URL: https://github.com/apache/incubator-doris/pull/3335#discussion_r409405050
 
 

 ##########
 File path: docs/documentation/cn/administrator-guide/load-data/delete-manual.md
 ##########
 @@ -0,0 +1,178 @@
+<!-- 
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+#Delete
+
+Delete不同于其他导入方式,它是一个同步过程。和Insert into相似,所有的Delete操作在Doris中是一个独立的导入作业,一般Delete语句需要指定表和分区以及删除的条件来涮选要删除的数据,并将会同时删除base表和rollup表的数据。
+
+##语法
+
+主要的Delete语法如下:
+
+```
+DELETE FROM table_name [PARTITION partition_name]
+        WHERE
+        column_name1 op value[ AND column_name2 op value ...];
+```
+
+示例1:
+
+```
+DELETE FROM my_table PARTITION p1
+        WHERE k1 = 3;
+```
+
+示例2:
+
+```
+DELETE FROM my_table PARTITION p1
+        WHERE k1 < 3 AND k2 = "abc";
+```
+
+下面介绍删除语句中使用到的参数:
+
+* PARTITION
+	
+	Delete语句的目标分区,若未指定,则此表必须为单分区表,否则无法delete
+
+* WHERE
+	
+	Delete语句的条件语句,所有删除语句都必须指定WHERE语句
+
+说明:
+
+1. `Where`语句中的op的类型可包括`=,>,<,>=,<=,!=`
+2. `Where`语句中的列只能是`key`列
+3.  当选定的`key`列不存在某个rollup表内时,无法进行delete
+4.  条件语句中各个条件只能是`and`关系,如希望达成`or`可将条件分别写入两个delete语句中
+5.  如果指定表为RANGE分区表,则必须指定 `PARTITION`。如果是单分区表,可以不指定。
+6.  不同于Insert into命令,delete不能手动指定`label`,有关label的概念可以查看[Insert Into文档] (./insert-into-manual.md)
+
+##返回结果
+
+Delete命令是一个SQL命令,返回结果是同步的,分为以下几种:
 
 Review comment:
   既然delete是同步的,为啥会有delete成功但是还需要等待的状态?能否解释一下?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org