Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ The user executing this SQL command must have at least the following permissions

1. Before adding a new FOLLOWER node, make sure the node is properly configured.
2. Before adding a FOLLOWER node, ensure that the number of FOLLOWER nodes in the cluster is an odd number after the addition.
3. After adding the FOLLOWER node, use[`SHOW FRONTENDS`](./SHOW-FRONTENDS.md)command to verify that they have been added successfully and are in a normal state.
3. After adding the FOLLOWER node, use the [`SHOW FRONTENDS`](./SHOW-FRONTENDS.md) command to verify that they have been added successfully and are in a normal state.

## Examples

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ The user executing this SQL command must have at least the following permissions
## Usage Notes

1. Before adding a new OBSERVER node, make sure the node is properly configured.
2. After adding the OBSERVER node, use[`SHOW FRONTENDS`](./SHOW-FRONTENDS.md)command to verify that they have been added successfully and are in a normal state.
2. After adding the OBSERVER node, use the [`SHOW FRONTENDS`](./SHOW-FRONTENDS.md) command to verify that they have been added successfully and are in a normal state.

## Examples

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ The user who executes this operation needs to have the NODE_PRIV permission.
1. Delete all Brokers

```sql
ALTER SYSTEM DROP ALL BROKER broker_name.
ALTER SYSTEM DROP ALL BROKER broker_name;
```

2. Delete a specific Broker node
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ The user executing this SQL command must have at least the following permissions

1. Before deleting a FOLLOWER node, make sure that the node that needs to be taken offline is not a Master node.
2. Before deleting a FOLLOWER node, ensure that the number of FOLLOWER nodes in the cluster is an odd number after they go offline.
3. After deleting the FOLLOWER node[`SHOW FRONTENDS`](./SHOW-FRONTENDS.md)command to verify that they were successfully deleted.
3. After deleting the FOLLOWER node, use the [`SHOW FRONTENDS`](./SHOW-FRONTENDS.md) command to verify that they were successfully deleted.

## Examples

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ The user executing this SQL command must have at least the following permissions

## Usage Notes

1. After deleting the OBSERVER node, use[`SHOW FRONTENDS`](./SHOW-FRONTENDS.md)command to verify that they were successfully deleted.
1. After deleting the OBSERVER node, use the [`SHOW FRONTENDS`](./SHOW-FRONTENDS.md) command to verify that they were successfully deleted.

## Examples

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

This statement is used to modify the attributes of BE nodes. After modifying the attributes of BE nodes, it will affect the query, write, and data distribution of the current node. The following are the attributes that can be modified:

| 属性 | 影响 |
| Property | Effect |
|-----------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `tag.location` | The resource tag of the BE, with the `default` value being default. After modification, it will affect the data balancing of BEs within the same tag group and the BE nodes for data distribution during table creation. For more information, please refer to[Resource Group](../../../../admin-manual/workload-management/resource-group.md) |
| `disable_query` | Whether to disable queries, with the default value being `false`. After setting it to `true`, no new query requests will be scheduled to this BE node. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ ALTER SYSTEM MODIFY FRONTEND "<frontend_hostname_port>" HOSTNAME "<frontend_new_

## Access Control Requirements

The user executing this SQL command must have at least NOD_PRIV permissions.
The user executing this SQL command must have at least NODE_PRIV permissions.

## Examples

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This statement is used to modify an existing hot-cold tiered migration policy. O

## Syntax
```sql
ALTER STORAGE POLICY '<policy_name>' PROPERTIE ("<key>"="<value>"[, ... ]);
ALTER STORAGE POLICY '<policy_name>' PROPERTIES ("<key>"="<value>"[, ... ]);
```

## Required Parameters
Expand All @@ -22,7 +22,7 @@ ALTER STORAGE POLICY '<policy_name>' PROPERTIE ("<key>"="<value>"[, ... ]);
> The name of the storage policy. This is the unique identifier of the storage policy you want to modify, and an existing policy name must be specified.

## Optional Parameters
`PROPERTIE ("<key>"="<value>"[, ... ])`
`PROPERTIES ("<key>"="<value>"[, ... ])`

1.`retention_days`
> Data retention period. Defines the duration for which the data is kept in storage. Data exceeding this period will be automatically deleted.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ PROPERTIES (<storage_vault_property>)
>- vault_name: The name of the vault. When a vault is set as the default storage vault using the statement `SET <original_vault_name> DEFAULT STORAGE VAULT`, its name cannot be modified. To rename the vault, you must first unset the default storage vault by executing the `UNSET DEFAULT STORAGE VAULT` command, and then modify its name. Finally, if you need to set the renamed vault as the default storage vault, you can use the statement `SET <new_vault_name> DEFAULT STORAGE VAULT`.
>- use_path_style: Whether to allow path style url, optional values are true, false. The default value is false.

>When type is hdfs, the following fields are prohibited:
>When type is hdfs, the allowed property fields are as follows:
>
>- path_prefix: Storage path prefix
>- fs.defaultFS: hdfs name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Its result is:
Then terminate it through `CANCEL WARM UP`:

```C++
CANCEL WARM UP WHERE id = 90290165739458;
CANCEL WARM UP JOB WHERE id = 90290165739458;
```

If the following content is returned, it indicates that the warm-up job corresponding to the specified id does not exist:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ To create a storage policy, you must first create a storage resource, and then a
CREATE STORAGE POLICY <policy_name>
PROPERTIES(
"storage_resource" = "<storage_resource_name>"
[{ "cooldown_datetime" = "<cooldown_datetime>"
| , "cooldown_ttl" = "<cooldown_ttl>"}]
[{, "cooldown_datetime" = "<cooldown_datetime>"
| , "cooldown_ttl" = "<cooldown_ttl>"}]
);
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ This statement is used to display the hotspot information of the file cache.

Before version 3.0.4, you could use the `SHOW CACHE HOTSPOT` statement to query cache hotspot information statistics. Starting from version 3.0.4, the use of the `SHOW CACHE HOTSPOT` statement for cache hotspot information statistics is no longer supported. Please directly access the system table `__internal_schema.cloud_cache_hotspot` for queries. For detailed usage, refer to [MANAGING FILE CACHE](../../../../compute-storage-decoupled/file-cache/file-cache).


:::

## Syntax

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
{
"title": "CREATE ROW POLICY",
"language": "en",
"description": "Explain can view the rewritten execution plan."
"description": "Creates a row-level security policy on a table to restrict the rows returned to specified users or roles."
}
---

## Description

Explain can view the rewritten execution plan.
Creates a row-level security policy on a table. The policy restricts the rows that specified users or roles can see by attaching a filter predicate that is applied to queries against the table.

## Syntax

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ The user executing this SQL command must have at least the following permissions

```sql
mysql> select * from order_analysis;
ERROR 1064 (HY000): errCode = 2, detailMessage = sql match regex sql block rule: order_analysis_rule
ERROR 1064 (HY000): errCode = 2, detailMessage = sql match regex sql block rule: test_rule
```

2. Create a rule that prevents scanning more than 30 partitions of the same table and restricts the query data volume to no more than 10 billion rows
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ SHOW SQL_BLOCK_RULE [FOR <rule_name>];

`<rule_name>`

The name of the SQL blocking rule to display. If omitted, all rules will be shown. |
The name of the SQL blocking rule to display. If omitted, all rules will be shown.

## Access Control Requirements

Expand All @@ -36,12 +36,12 @@ SHOW SQL_BLOCK_RULE;
```

```text
+------------+----------------------------+---------+-------------+------------+-------------+--------+--------+
| Name | Sql | SqlHash | PartitionNum | TabletNum | Cardinality | Global | Enable |
+------------+----------------------------+---------+-------------+------------+-------------+--------+--------+
| test_rule | select * from order_analysis | NULL | 0 | 0 | 0 | true | true |
| test_rule2 | NULL | NULL | 30 | 0 | 10000000000 | false | true |
+------------+----------------------------+---------+-------------+------------+-------------+--------+--------+
+------------+------------------------------+---------+--------------+-----------+-------------+--------+--------+
| Name | Sql | SqlHash | PartitionNum | TabletNum | Cardinality | Global | Enable |
+------------+------------------------------+---------+--------------+-----------+-------------+--------+--------+
| test_rule | select * from order_analysis | NULL | 0 | 0 | 0 | true | true |
| test_rule2 | NULL | NULL | 30 | 0 | 10000000000 | false | true |
+------------+------------------------------+---------+--------------+-----------+-------------+--------+--------+
```

2. Display a specific SQL blocking rule
Expand All @@ -50,9 +50,9 @@ SHOW SQL_BLOCK_RULE FOR test_rule2;
```

```text
+------------+------+---------+-------------+------------+-------------+--------+--------+
| Name | Sql | SqlHash | PartitionNum | TabletNum | Cardinality | Global | Enable |
+------------+------+---------+-------------+------------+-------------+--------+--------+
| test_rule2 | NULL | NULL | 30 | 0 | 10000000000 | false | true |
+------------+------+---------+-------------+------------+-------------+--------+--------+
+------------+------+---------+--------------+-----------+-------------+--------+--------+
| Name | Sql | SqlHash | PartitionNum | TabletNum | Cardinality | Global | Enable |
+------------+------+---------+--------------+-----------+-------------+--------+--------+
| test_rule2 | NULL | NULL | 30 | 0 | 10000000000 | false | true |
+------------+------+---------+--------------+-----------+-------------+--------+--------+
```
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ The [user](../../../../admin-manual/auth/authentication-and-authorization.md) ex
- A single MERGE statement can include multiple matching and not-matching clauses (that is, WHEN MATCHED ... and WHEN NOT MATCHED ...).
- Any matching or not-matching clause that omits the AND subclause (default behavior) must be the last of its clause type in the statement (for example, a WHEN MATCHED ... clause can’t be followed by a WHEN MATCHED AND ... clause). Doing so results in an unreachable case, which returns an error.

### Duplicate join behavior
### Duplicate join behavior

Currently, Doris does not detect whether duplicate join rows occur. If they do, the behavior is undefined.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

This syntax is used to view the result of the latest insert operation in the current session connection

grammar:
## Syntax

```sql
SHOW LAST INSERT
Expand All @@ -28,7 +28,7 @@ TransactionStatus: VISIBLE
FilteredRows: 0
```

illustrate:
## Return Value

* TransactionId: transaction id
* Label: the label corresponding to the insert task
Expand All @@ -47,7 +47,7 @@ illustrate:

## Keywords

SHOW, LASR ,INSERT
SHOW, LAST, INSERT

## Best Practice

Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Users executing this SQL command must have at least the following privileges:

| Privilege | Object | Notes |
| :-------- | :----- | :---- |
| LOAD_PRIV | Table | SHOW ROUTINE LOAD requires LOAD privilege on the table |
| LOAD_PRIV | Table | ALTER ROUTINE LOAD requires LOAD privilege on the table |

## Notes

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ WHERE [LABEL = "<load_label>" | LABEL like "<label_pattern>" | STATE = { "PENDIN

> If `LABEL LIKE "<label_pattern>"` is used, it matches import tasks whose labels contain the `label_pattern`.

**3. STATE = { " PENDING " | " ETL " | " LOADING " | " FINISHED " | " CANCELLED " }**
**3. STATE = { " PENDING " | " ETL " | " LOADING " }**

> Specifying `PENDING` means cancelling jobs with the `STATE = "PENDING"` status. The same applies to other statuses.

Expand Down Expand Up @@ -67,7 +67,7 @@ Users executing this SQL command must have at least the following permissions:
```sql
CANCEL LOAD
FROM example_db
WHERE LABEL like "example_";
WHERE LABEL like "%example_%";
```

3. Cancel import jobs in the `LOADING` state.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

The Routine Load feature allows users to submit a resident import task that continuously reads data from a specified data source and imports it into Doris.

Currently, it only supports importing CSV or Json format data from Kafka through unauthenticated or SSL authentication methods. [Example of importing Json format data](../../../../data-operate/import/import-way/routine-load-manual.md#Example-of-importing-Json-format-data)
Currently, it only supports importing CSV or Json format data from Kafka through unauthenticated or SSL authentication methods. [Example of importing Json format data](../../../../data-operate/import/import-way/routine-load-manual.md#import-examples)

## Syntax

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Users executing this SQL command must have at least the following privileges:

| Privilege | Object | Notes |
| :-------- | :----- | :---- |
| LOAD_PRIV | Table | SHOW ROUTINE LOAD requires LOAD privilege on the table |
| LOAD_PRIV | Table | PAUSE ROUTINE LOAD requires LOAD privilege on the table |

## Notes

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Users executing this SQL command must have at least the following privileges:

| Privilege | Object | Notes |
| :-------- | :----- | :---- |
| LOAD_PRIV | Table | SHOW ROUTINE LOAD requires LOAD privilege on the table |
| LOAD_PRIV | Table | RESUME ROUTINE LOAD requires LOAD privilege on the table |

## Notes

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Users executing this SQL command must have at least the following permission:

| Privilege | Object | Notes |
| :--------- | :----- | :------------------------------------------------------- |
| LOAD_PRIV | Table | SHOW ROUTINE LOAD requires LOAD permission on the table |
| LOAD_PRIV | Table | SHOW CREATE ROUTINE LOAD requires LOAD permission on the table |

## Examples

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ SHOW LOAD

**4. STATE = { " PENDING " | " ETL " | " LOADING " | " FINISHED " | " CANCELLED " }**

> Specifying `PENDING` means matching jobs with the `LOAD = "PENDING"` status. The same applies to other status keywords.
> Specifying `PENDING` means matching jobs with the `STATE = "PENDING"` status. The same applies to other status keywords.

**5. `<col_name>`**

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Users executing this SQL command must have at least the following permission:

| Privilege | Object | Notes |
| :--------- | :----- | :------------------------------------------------------- |
| LOAD_PRIV | Table | SHOW ROUTINE LOAD requires LOAD permission on the table |
| LOAD_PRIV | Table | STOP ROUTINE LOAD requires LOAD permission on the table |

## Notes

Expand Down
14 changes: 7 additions & 7 deletions docs/sql-manual/sql-statements/data-query/SELECT.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,9 +210,9 @@ Recursive CTE is currently not supported.
10. UNION Example

```sql
SELECT a FROM t1 WHERE a = 10 AND B = 1 ORDER by LIMIT 10
SELECT a FROM t1 WHERE a = 10 AND B = 1 ORDER BY a LIMIT 10
UNION
SELECT a FROM t2 WHERE a = 11 AND B = 2 ORDER by LIMIT 10;
SELECT a FROM t2 WHERE a = 11 AND B = 2 ORDER BY a LIMIT 10;
```

11. WITH clause example
Expand All @@ -227,7 +227,7 @@ Recursive CTE is currently not supported.
SELECT col1, col2 FROM cte;
```

12. JOIN Exampel
12. JOIN Example

```sql
SELECT * FROM t1 LEFT JOIN (t2, t3, t4)
Expand Down Expand Up @@ -284,7 +284,7 @@ Recursive CTE is currently not supported.

## Best Practice

1. ome additional knowledge about the SELECT clause
1. Some additional knowledge about the SELECT clause

- An alias can be specified for select_expr using AS alias_name. Aliases are used as column names in expressions and can be used in GROUP BY, ORDER BY or HAVING clauses. The AS keyword is a good habit to use when specifying aliases for columns.

Expand Down Expand Up @@ -356,17 +356,17 @@ Recursive CTE is currently not supported.

DISTINCT removes duplicate rows.

2. The main advantage of subqueries
3. The main advantage of subqueries

- Subqueries allow structured queries so that each part of a statement can be isolated.
- Some operations require complex unions and associations. Subqueries provide other ways to perform these operations

3. Speed up queries
4. Speed up queries

- Use Doris's partition and bucket as data filtering conditions as much as possible to reduce the scope of data scanning
- Make full use of Doris's prefix index fields as data filter conditions to speed up query speed

4. UNION
5. UNION

- Using only the union keyword has the same effect as using union disitnct. Since the deduplication work is more memory-intensive, the query speed using the union all operation will be faster and the memory consumption will be less. If users want to perform order by and limit operations on the returned result set, they need to put the union operation in the subquery, then select from subquery, and finally put the subquery and order by outside the subquery.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
}
---

### Description
## Description

This statement is used to find the corresponding database name based on the database id (only used by administrators)

Expand Down
2 changes: 1 addition & 1 deletion docs/sql-manual/sql-statements/database/SHOW-DATABASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ The user executing this SQL command must have at least the following permissions
|:-----------|:------|:---------------|
| SELECT_PRIV | Corresponding database | Requires read permission on the corresponding database |

## 示例
## Examples

- Displays the names of all current databases.

Expand Down
2 changes: 1 addition & 1 deletion docs/sql-manual/sql-statements/function/DROP-FUNCTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Delete a custom function.
## Syntax

```sql
DROP [ GLOBAL ] <function_name> ( <arg_type> )
DROP [ GLOBAL ] FUNCTION <function_name> ( <arg_type> )
```

## Required Parameters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ The user executing this SQL command must have at least the following permissions

1. Before adding a new FOLLOWER node, make sure the node is properly configured.
2. Before adding a FOLLOWER node, ensure that the number of FOLLOWER nodes in the cluster is an odd number after the addition.
3. After adding the FOLLOWER node, use[`SHOW FRONTENDS`](./SHOW-FRONTENDS.md)command to verify that they have been added successfully and are in a normal state.
3. After adding the FOLLOWER node, use the [`SHOW FRONTENDS`](./SHOW-FRONTENDS.md) command to verify that they have been added successfully and are in a normal state.

## Examples

Expand Down
Loading
Loading