github-actions[bot] commented on code in PR #3495:
URL: https://github.com/apache/doris-website/pull/3495#discussion_r2992785733
##########
versioned_docs/version-4.x/sql-manual/sql-statements/data-modification/DML/DELETE.md:
##########
@@ -179,6 +187,18 @@ This feature is supported since the Apache Doris 1.2
version
where lineitem.o_orderkey = discount_orders.o_orderkey;
```
+6. Delete with ORDER BY and LIMIT — delete the first 3 rows ordered by k1 in
ascending order
Review Comment:
Same issue as in the dev/current docs: the new DELETE examples omit the
`WHERE` clause that Syntax 2 marks as required. Please add a `WHERE` clause or
update the syntax definition to clarify that `WHERE` is optional when `ORDER BY
+ LIMIT` is specified.
##########
docs/sql-manual/sql-statements/data-modification/DML/DELETE.md:
##########
@@ -179,6 +183,18 @@ This feature is supported since the Apache Doris 1.2
version
where lineitem.o_orderkey = discount_orders.o_orderkey;
```
+6. Delete with ORDER BY and LIMIT — delete the first 3 rows ordered by k1 in
ascending order
+
+ ```sql
+ DELETE FROM my_table ORDER BY k1 ASC LIMIT 3;
+ ```
+
+7. Delete with ORDER BY, LIMIT and offset — skip the first 10 rows and delete
the next 5 rows ordered by k1
+
+ ```sql
+ DELETE FROM my_table ORDER BY k1 ASC LIMIT 10, 5;
+ ```
Review Comment:
Same issue as example 6: `DELETE FROM my_table ORDER BY k1 ASC LIMIT 10, 5;`
is missing a `WHERE` clause, contradicting the required syntax definition in
Syntax 2.
##########
docs/sql-manual/sql-statements/data-modification/DML/DELETE.md:
##########
@@ -46,6 +48,8 @@ DELETE FROM table_name
+ PARTITION partition_name | PARTITIONS (partition_name [, partition_name]):
Specifies the partition or partitions to select rows for removal
+ table_alias: alias of table
+ USING additional_tables: If you need to refer to additional tables in the
WHERE clause to help identify the rows to be removed, then specify those table
names in the USING clause. You can also use the USING clause to specify
subqueries that identify the rows to be removed.
++ ORDER BY column: Specifies the order in which rows are deleted. Used
together with LIMIT to control which rows are affected.
++ LIMIT [offset,] count: Limits the number of rows to be deleted. When used
with ORDER BY, deletes the first `count` rows after sorting. If `offset` is
specified, skips the first `offset` rows before deleting.
Review Comment:
Minor: The `ORDER BY` parameter description says "Used together with LIMIT
to control which rows are affected." This wording implies ORDER BY requires
LIMIT. Since both are independently optional in the syntax block, consider
wording like "Typically used together with LIMIT" to avoid confusion about
whether ORDER BY can be used alone.
##########
i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-statements/data-modification/DML/DELETE.md:
##########
@@ -174,6 +182,18 @@ DELETE FROM table_name [table_alias]
where lineitem.o_orderkey = discount_orders.o_orderkey;
```
+6. 使用 ORDER BY 和 LIMIT 删除数据——按照 k1 列升序排列,删除前 3 行
Review Comment:
Same WHERE clause omission issue in the Chinese 4.x DELETE docs. The example
`DELETE FROM my_table ORDER BY k1 ASC LIMIT 3;` is missing a `WHERE` clause per
Syntax 2's required syntax.
##########
i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/data-modification/DML/DELETE.md:
##########
@@ -174,6 +178,18 @@ DELETE FROM table_name [table_alias]
where lineitem.o_orderkey = discount_orders.o_orderkey;
```
+6. 使用 ORDER BY 和 LIMIT 删除数据——按照 k1 列升序排列,删除前 3 行
+
+ ```sql
+ DELETE FROM my_table ORDER BY k1 ASC LIMIT 3;
+ ```
Review Comment:
The Chinese (dev/current) DELETE examples also omit the `WHERE` clause:
`DELETE FROM my_table ORDER BY k1 ASC LIMIT 3;`. This contradicts the Syntax 2
definition where `WHERE condition` appears without square brackets (required).
Please align the examples with the syntax definition.
##########
docs/sql-manual/sql-statements/data-modification/DML/DELETE.md:
##########
@@ -179,6 +183,18 @@ This feature is supported since the Apache Doris 1.2
version
where lineitem.o_orderkey = discount_orders.o_orderkey;
```
+6. Delete with ORDER BY and LIMIT — delete the first 3 rows ordered by k1 in
ascending order
+
+ ```sql
+ DELETE FROM my_table ORDER BY k1 ASC LIMIT 3;
+ ```
Review Comment:
The DELETE example omits a `WHERE` clause, but in Syntax 2 the `WHERE
condition` is listed without square brackets (i.e., required). This example
`DELETE FROM my_table ORDER BY k1 ASC LIMIT 3;` contradicts the documented
syntax.
Please either:
1. Add a `WHERE` clause to both new examples (e.g., `DELETE FROM my_table
WHERE 1=1 ORDER BY k1 ASC LIMIT 3;` or a more meaningful predicate), or
2. If `WHERE` is truly optional when using `ORDER BY + LIMIT`, update the
Syntax 2 block to wrap `WHERE condition` in square brackets.
--
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]