This is an automated email from the ASF dual-hosted git repository.

luzhijing pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris-website.git


The following commit(s) were added to refs/heads/master by this push:
     new 4dbe5c9f66e2 [docs](update) Update EN Docs and fix doris-streamloader 
title (#442)
4dbe5c9f66e2 is described below

commit 4dbe5c9f66e2590d35362a5b565adfcee8e9366b
Author: KassieZ <[email protected]>
AuthorDate: Wed Mar 20 22:39:48 2024 +0800

    [docs](update) Update EN Docs and fix doris-streamloader title (#442)
---
 .../current/ecosystem/doris-streamloader.md        |  23 +-
 .../query/query-data/mysql-compatibility.md        |  52 ++--
 .../version-2.1/ecosystem/doris-streamloader.md    |  23 +-
 .../data-operate/update/unique-update.md           |  66 +++-
 .../query/query-data/encryption-function.md        | 179 ++++++++++-
 .../query/query-data/mysql-compatibility.md        | 332 ++++++++++++++++++++-
 6 files changed, 622 insertions(+), 53 deletions(-)

diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/ecosystem/doris-streamloader.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/ecosystem/doris-streamloader.md
index 96ca55e5aa68..ce7f7195df25 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/ecosystem/doris-streamloader.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/ecosystem/doris-streamloader.md
@@ -1,4 +1,3 @@
-
 ---
 {
     "title": "Doris Streamloader",
@@ -38,7 +37,7 @@ under the License.
 
 **1.0 版本** 
 
-源代码:  https://github.com/apache/doris-streamloader
+源代码:https://github.com/apache/doris-streamloader
 
 | 版本    | 日期      |  平台  |  链接  |
 |---|---|---|---|
@@ -122,16 +121,16 @@ doris-streamloader --source_file="data.csv" 
--url="http://localhost:8330"; --head
 | --u      | 数据库用户名      |  root    |      |
 | --p      | 数据库用户对应的密码   |  空字符串    |      |
 | --compress      | 导入数据是否在 HTTP 传输时压缩   |  false    |   保持默认,打开后压缩解压会分别增加工具和 
Doris BE 的 CPU 压力,所以仅在数据源所在机器网络带宽瓶颈时打开   |
-|--timeout    | 向 Doris 发送 HTTP 请求的超时时间, 单位:秒   |  60\*60\*10    | 保持默认   |
-| --batch      | 文件批量读取和发送的粒度, 单位: 行      |  4096    |  保持默认    |
-| --batch_byte      | 文件批量读取和发送的粒度, 单位: byte      |  943718400 (900MB)    |  
保持默认    |
-| --workers   | 导入的并发数   |  0    |   设置成 0 为自动模式,会根据导入数据的大小,磁盘的吞吐量,Stream Load 
导入速度计算一个值。 也可以手动设置,性能好的集群可以设置大点,最好不要超过 10。如果观察到导入内存过高(通过观察 Memtracker 或者 Exceed 
日志), 则可适当降低 worker 数量   |
-| --disk_throughput      | 磁盘的吞吐量,单位 MB/s   |  800    |  通常保持默认即可。该值参与 
--workers 的自动推算过程。 如果希望通过工具能计算出一个适当的 workers 数,可以根据实际磁盘吞吐设置。  |
-|--streamload_throughput | Stream Load 导入实际的吞吐大小,单位 MB/s | 100 | 通常保持默认即可。该值参与 
--workers 的自动推算过程。 默认值是通过每日性能测试环境给出的 Stream Load 吞吐量以及性能可预测性得出的。 
如果希望通过工具能计算出一个适当的 workers 数,可以设置实测的 Stream Load 
的吞吐,即:(LoadBytes\*1000)/(LoadTimeMs\*1024\*1024) 计算出实际的吞吐量 |
+|--timeout    | 向 Doris 发送 HTTP 请求的超时时间,单位:秒   |  60\*60\*10    | 保持默认   |
+| --batch      | 文件批量读取和发送的粒度,单位:行      |  4096    |  保持默认    |
+| --batch_byte      | 文件批量读取和发送的粒度,单位:byte      |  943718400 (900MB)    |  
保持默认    |
+| --workers   | 导入的并发数   |  0    |   设置成 0 为自动模式,会根据导入数据的大小,磁盘的吞吐量,Stream Load 
导入速度计算一个值。也可以手动设置,性能好的集群可以设置大点,最好不要超过 10。如果观察到导入内存过高(通过观察 Memtracker 或者 Exceed 
日志), 则可适当降低 worker 数量   |
+| --disk_throughput      | 磁盘的吞吐量,单位 MB/s   |  800    |  通常保持默认即可。该值参与 
--workers 的自动推算过程。如果希望通过工具能计算出一个适当的 workers 数,可以根据实际磁盘吞吐设置。  |
+|--streamload_throughput | Stream Load 导入实际的吞吐大小,单位 MB/s | 100 | 通常保持默认即可。该值参与 
--workers 的自动推算过程。默认值是通过每日性能测试环境给出的 Stream Load 
吞吐量以及性能可预测性得出的。如果希望通过工具能计算出一个适当的 workers 数,可以设置实测的 Stream Load 
的吞吐,即:(LoadBytes\*1000)/(LoadTimeMs\*1024\*1024) 计算出实际的吞吐量 |
 | --max_byte_per_task      | 每个导入任务数据量的最大大小,超过这个值剩下的数据会被拆分到一个新的导入任务中。  |  
107374182400 (100G)    |  建议设置一个很大的值来减少导入的版本数。但如果遇到 body exceed max size 
错误且不想调整 streaming_load_max_mb 参数(需重启 be),又或是遇到 -238 TOO MANY SEGMENT 
错误,可以临时调小这个配置    |
-| --check_utf8 | <p>是否对导入数据的编码进行检查:</p>   <p> 1) false,那么不做检查直接将原始数据导入; 2) 
true,那么对数据中非 utf-8 编码的字符用 � 进行替代</p> | true |保持默认|
+| --check_utf8 | <p>是否对导入数据的编码进行检查:</p>   <p> 1)false,那么不做检查直接将原始数据导入; 
2)true,那么对数据中非 utf-8 编码的字符用 � 进行替代</p> | true |保持默认|
 |--debug |打印 Debug 日志 | false | 保持默认|
-|--auto_retry| 自动重传失败的 worker 序号和 task 序号的列表 | 空字符串 | 
仅导入失败时重传使用,正常导入无需关心。失败时会提示具体参数内容,复制执行即可。例:如果 --auto_retry="1,1,2,1" 则表示: 
需要重传的task为:第一个 worker 的第一个 task,第二个 worker 的第一个 task。 |
+|--auto_retry| 自动重传失败的 worker 序号和 task 序号的列表 | 空字符串 | 
仅导入失败时重传使用,正常导入无需关心。失败时会提示具体参数内容,复制执行即可。例:如果 --auto_retry="1,1,2,1" 则表示:需要重传的 
task 为:第一个 worker 的第一个 task,第二个 worker 的第一个 task。 |
 |--auto_retry_times | 自动重传的次数 | 3 | 保持默认,如果不想重传需要把这个值设置为 0 |
 |--auto_retry_interval | 自动重传的间隔 | 60 | 保持默认,如果 Doris 因宕机导致失败,建议根据实际 Doris 
重启的时间间隔来设置该值 |
 |--log_filename | 日志存储的位置 | "" | 
默认将日志打印到控制台上,如果要打印到日志文件中,可以设置存储日志文件的路径,如--log_filename = "/var/log" |
@@ -157,7 +156,7 @@ doris-streamloader --source_file="data.csv" 
--url="http://localhost:8330"; --head
 
 
 
-具体例子如下:
+具体例子如下:
 
 - 导入成功,成功信息如下: 
 
@@ -189,7 +188,7 @@ doris-streamloader --source_file="data.csv" 
--url="http://localhost:8330"; --head
   ./doris-streamloader --source_file 
/mnt/disk1/laihui/doris/tools/tpch-tools/bin/tpch-data/lineitem.tbl.1  
--url="http://127.0.0.1:8239"; --header="column_separator:|?columns: l_orderkey, 
l_partkey, l_suppkey, l_linenumber, l_quantity, l_extendedprice, l_discount, 
l_tax, l_returnflag,l_linestatus, 
l_shipdate,l_commitdate,l_receiptdate,l_shipinstruct,l_shipmode,l_comment,temp" 
--db="db" --table="lineitem1" -u root -p "" --compress=false --timeout=36000 
--workers=3 --batch=4096 --batch_byt [...]
   ```
   
-只需复制运行该命令即可,`auto_retry` 说明可参考, 并给出失败的结果信息:
+只需复制运行该命令即可,`auto_retry` 说明可参考,并给出失败的结果信息:
 
 ```Go
 Load Result: {
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/query/query-data/mysql-compatibility.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/query/query-data/mysql-compatibility.md
index cab4ca833d0a..fd92016001c7 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/query/query-data/mysql-compatibility.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/query/query-data/mysql-compatibility.md
@@ -33,40 +33,40 @@ Doris 是高度兼容 MySQL 语法,支持标准 SQL。但是 Doris 与 MySQL 
 
 | 类型         | MySQL                                                        | 
Doris                                                  |
 | ------------ | ------------------------------------------------------------ 
| ------------------------------------------------------ |
-| Boolean      | - 支持 - 范围:0 代表 false,1 代表 true                         | - 支持 
- 关键字:Boolean - 范围:0 代表 false,1 代表 true |
-| Bit          | - 支持 - 范围:1 ~ 64                                        | 不支持 
                                                |
-| Tinyint      | - 支持 - 支持 signed,unsigned - 范围:  - signed: -128 ~ 127  - 
unsigned: 0 ~ 255 | - 支持 - 只支持 signed - 范围:-128 ~ 127               |
-| Smallint     | - 支持 - 支持 signed,unsigned - 范围:  - signed: -2^15 ~ 2^15-1  - 
unsigned: 0 ~ 2^16-1 | - 支持 - 只支持 signed - 范围:-32768 ~ 32767           |
-| Mediumint    | - 支持 - 支持 signed,unsigned - 范围:  - signed: -2^23 ~ 2^23-1  - 
unsigned: 0 ~ -2^24-1 | - 不支持                                               |
-| int          | - 支持 - 支持 signed,unsigned - 范围:  - signed: -2^31 ~ 2^31-1  - 
unsigned: 0 ~ -2^32-1 | - 支持 - 只支持 signed - 范围: -2147483648~ 2147483647 |
-| Bigint       | - 支持 - 支持 signed,unsigned - 范围:  - signed: -2^63 ~ 2^63-1  - 
unsigned: 0 ~ 2^64-1 | - 支持 - 只支持 signed - 范围: -2^63 ~ 2^63-1          |
-| Largeint     | - 不支持                                                     | - 
支持 - 只支持 signed - 范围:-2^127 ~ 2^127-1         |
-| Decimal      | - 支持 - 支持 signed,unsigned(8.0.17 以前支持,以后被标记为 deprecated) - 
默认值:Decimal(10, 0) | - 支持 - 只支持 signed - 默认值:Decimal(9, 0)          |
-| Float/Double | - 支持 - 支持 signed,unsigned(8.0.17 以前支持,以后被标记为 deprecated) | - 
支持 - 只支持 signed                                  |
+| Boolean      | <p>- 支持</p> <p>- 范围:0 代表 false,1 代表 true</p>                  
       | <p>- 支持</p> <p>- 关键字:Boolean</p> <p>- 范围:0 代表 false,1 代表 true</p> |
+| Bit          | <p>- 支持</p> <p>- 范围:1 ~ 64</p>                                
        | 不支持                                                 |
+| Tinyint      | <p>- 支持</p> <p>- 支持 signed,unsigned</p> <p>- 范围:  - signed: 
-128 ~ 127</p>  <p>- unsigned: 0 ~ 255</p> | <p>- 支持</p> <p>- 只支持 signed</p> 
<p>- 范围:-128 ~ 127</p>               |
+| Smallint     | <p>- 支持</p> <p>- 支持 signed,unsigned</p> <p>- 范围:</p>  <p>- 
signed: -2^15 ~ 2^15-1</p> <p>- unsigned: 0 ~ 2^16-1</p> | <p>- 支持</p> <p>- 只支持 
signed</p> <p>- 范围:-32768 ~ 32767</p>           |
+| Mediumint    | <p>- 支持</p> <p>- 支持 signed,unsigned</p> <p>- 范围:</p>  <p>- 
signed: -2^23 ~ 2^23-1</p>  <p>- unsigned: 0 ~ -2^24-1</p> | - 不支持              
                                 |
+| int          | <p>- 支持</p> <p>- 支持 signed,unsigned</p> <p>- 范围:</p>  <p>- 
signed: -2^31 ~ 2^31-1</p>  <p>- unsigned: 0 ~ -2^32-1</p> | <p>- 支持</p> <p>- 
只支持 signed</p> <p>- 范围: -2147483648~ 2147483647</p> |
+| Bigint       | <p>- 支持</p> <p>- 支持 signed,unsigned</p> <p>- 范围:</p>  <p>- 
signed: -2^63 ~ 2^63-1</p>  <p>- unsigned: 0 ~ 2^64-1</p> | <p>- 支持</p> <p>- 
只支持 signed</p> <p>- 范围: -2^63 ~ 2^63-1 </p>         |
+| Largeint     | - 不支持                                                     | 
<p>- 支持</p> <p>- 只支持 signed</p> <p>- 范围:-2^127 ~ 2^127-1</p>         |
+| Decimal      | <p>- 支持</p> <p>- 支持 signed,unsigned(8.0.17 以前支持,以后被标记为 
deprecated)</p> <p>- 默认值:Decimal(10, 0)</p> | <p>- 支持</p> <p>- 只支持 signed</p> 
<p>- 默认值:Decimal(9, 0)</p>          |
+| Float/Double | <p>- 支持</p> <p>- 支持 signed,unsigned(8.0.17 以前支持,以后被标记为 
deprecated)</p> | <p>- 支持</p> <p>- 只支持 signed</p>                               
   |
 
 ### 日期类型
 
 | 类型      | MySQL                                                        | 
Doris                                                        |
 | --------- | ------------------------------------------------------------ | 
------------------------------------------------------------ |
-| Date      | - 支持 - 范围:['1000-01-01','9999-12-31'] - 格式:YYYY-MM-DD | - 支持 - 
范围:['0000-01-01', '9999-12-31'] - 格式:YYYY-MM-DD |
-| DateTime  | - 支持 - DATETIME([P]),可选参数 P 表示精度 - 范围:'1000-01-01 
00:00:00.000000' ,'9999-12-31 23:59:59.999999' - 格式:YYYY-MM-DD 
hh:mm:ss[.fraction] | - 支持 - DATETIME([P]),可选参数 P 表示精度 - 范围:['0000-01-01 
00:00:00[.000000]', '9999-12-31 23:59:59[.999999]'] - 格式:YYYY-MM-DD 
hh:mm:ss[.fraction] |
-| Timestamp | - 支持 - Timestamp[(p)],可选参数 P 表示精度 - 范围:['1970-01-01 
00:00:01.000000' UTC , '2038-01-19 03:14:07.999999' UTC] - 格式:YYYY-MM-DD 
hh:mm:ss[.fraction] | - 不支持                                                     
|
-| Time      | - 支持 - Time[(p)] - 范围:['-838:59:59.000000' to 
'838:59:59.000000'] - 格式:hh:mm:ss[.fraction] | - 不支持                            
                         |
-| Year      | - 支持 - 范围:1901 to 2155, or 0000 - 格式:yyyy            | - 不支持     
                                                |
+| Date      | <p>- 支持 - 范围:['1000-01-01','9999-12-31']</p> <p>- 
格式:YYYY-MM-DD</p> | <p>- 支持</p> <p>- 范围:['0000-01-01', '9999-12-31']</p> <p>- 
格式:YYYY-MM-DD</p> |
+| DateTime  | <p>- 支持</p> <p>- DATETIME([P]),可选参数 P 表示精度</p> <p>- 
范围:'1000-01-01 00:00:00.000000' ,'9999-12-31 23:59:59.999999'</p> <p>- 
格式:YYYY-MM-DD hh:mm:ss[.fraction]</p> | <p>- 支持</p> <p>- DATETIME([P]),可选参数 P 
表示精度</p> <p>- 范围:['0000-01-01 00:00:00[.000000]', '9999-12-31 
23:59:59[.999999]']</p> <p>- 格式:YYYY-MM-DD hh:mm:ss[.fraction]</p> |
+| Timestamp | <p>- 支持</p> <p>- Timestamp[(p)],可选参数 P 表示精度</p> <p>- 
范围:['1970-01-01 00:00:01.000000' UTC , '2038-01-19 03:14:07.999999' UTC]</p> 
<p>- 格式:YYYY-MM-DD hh:mm:ss[.fraction]</p> | - 不支持                              
                       |
+| Time      | <p>- 支持</p> <p>- Time[(p)]</p> <p>- 范围:['-838:59:59.000000' to 
'838:59:59.000000']</p> <p>- 格式:hh:mm:ss[.fraction]</p> | - 不支持                 
                                    |
+| Year      | <p>- 支持</p> <p>- 范围:1901 to 2155, or 0000</p> <p>- 格式:yyyy</p>   
         | - 不支持                                                     |
 
 ### 字符串类型
 
 | 类型      | MySQL                                                        | 
Doris                                                        |
 | --------- | ------------------------------------------------------------ | 
------------------------------------------------------------ |
-| Char      | - 支持 - CHAR[(M),M 为字符长度,缺省表示长度为 1, - 定长 - 范围:[0,255],字节大小 | - 支持 
- CHAR[(M),M 为字节长度 - 可变 - 范围:[1,255]        |
-| Varchar   | - 支持 - VARCHAR(M),M 为字符长度 - 范围:[0,65535],字节大小 | - 支持 - 
VARCHAR(M),M 为字节长度。 - 范围:[1, 65533]        |
-| String    | - 不支持                                                     | - 支持 
- 1048576 字节(1MB),可调大到 2147483643 字节(2G) |
-| Binary    | - 支持 - 类似于 Char                                          | - 不支持 
                                                    |
-| Varbinary | - 支持 - 类似于 Varchar                                       | - 不支持 
                                                    |
-| Blob      | - 支持 - TinyBlob、Blob、MediumBlob、LongBlob                | - 不支持  
                                                   |
-| Text      | - 支持 - TinyText、Text、MediumText、LongText                | - 不支持  
                                                   |
-| Enum      | - 支持 - 最多支持 65535 个 elements                             | - 不支持 
                                                    |
-| Set       | - 支持 - 最多支持 64 个 elements                                | - 不支持 
                                                    |
+| Char      | <p>- 支持</p> <p>- CHAR[(M),M 为字符长度,缺省表示长度为 1</p> <p>- 定长</p> <p>- 
范围:[0,255],字节大小</p> | <p>- 支持</p> <p>- CHAR[(M),M 为字节长度</p> <p>- 可变</p> <p>- 
范围:[1,255]</p>        |
+| Varchar   | <p>- 支持</p> <p>- VARCHAR(M),M 为字符长度</p> <p>- 
范围:[0,65535],字节大小</p> | <p>- 支持</p> <p>- VARCHAR(M),M 为字节长度。</p> <p>- 范围:[1, 
65533]</p>        |
+| String    | - 不支持                                                     | <p>- 
支持</p> <p>- 1048576 字节(1MB),可调大到 2147483643 字节(2G)</p> |
+| Binary    | <p>- 支持</p> <p>- 类似于 Char</p>                                    
      | - 不支持                                                     |
+| Varbinary | <p>- 支持</p> <p>- 类似于 Varchar</p>                                 
      | - 不支持                                                     |
+| Blob      | <p>- 支持</p> <p>- TinyBlob、Blob、MediumBlob、LongBlob</p>           
     | - 不支持                                                     |
+| Text      | <p>- 支持</p> <p>- TinyText、Text、MediumText、LongText</p>           
     | - 不支持                                                     |
+| Enum      | <p>- 支持</p> <p>- 最多支持 65535 个 elements</p>                       
      | - 不支持                                                     |
+| Set       | <p>- 支持</p> <p>- 最多支持 64 个 elements</p>                          
      | - 不支持                                                     |
 
 ### JSON 数据类型
 
@@ -78,7 +78,7 @@ Doris 是高度兼容 MySQL 语法,支持标准 SQL。但是 Doris 与 MySQL 
 
 - **HyperLogLog**
 
-    HLL HLL 不能作为 key 列使用,支持在 Aggregate 模型、Duplicate 模型和 Unique 模型的表中使用。在 
Aggregate 模型表中使用时,建表时配合的聚合类型为 HLL_UNION。用户不需要指定长度和默认值。长度根据数据的聚合程度系统内控制。并且 HLL 
列只能通过配套的 hll_union_agg、hll_raw_agg、hll_cardinality、hll_hash 进行查询或使用。
+    HLL 不能作为 key 列使用,支持在 Aggregate 模型、Duplicate 模型和 Unique 模型的表中使用。在 Aggregate 
模型表中使用时,建表时配合的聚合类型为 HLL_UNION。用户不需要指定长度和默认值。长度根据数据的聚合程度系统内控制。并且 HLL 列只能通过配套的 
hll_union_agg、hll_raw_agg、hll_cardinality、hll_hash 进行查询或使用。
 
     HLL 是模糊去重,在数据量大的情况性能优于 Count Distinct。HLL 的误差通常在 1% 左右,有时会达到 2%。
 
@@ -292,7 +292,7 @@ INSERT INTO table_name
 
 Doris Insert 语法与 MySQL 的基本一致。
 
-**update**
+**Update**
 
 ```sql
 UPDATE target_table [table_alias]
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/ecosystem/doris-streamloader.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/ecosystem/doris-streamloader.md
index 96ca55e5aa68..ce7f7195df25 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/ecosystem/doris-streamloader.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/ecosystem/doris-streamloader.md
@@ -1,4 +1,3 @@
-
 ---
 {
     "title": "Doris Streamloader",
@@ -38,7 +37,7 @@ under the License.
 
 **1.0 版本** 
 
-源代码:  https://github.com/apache/doris-streamloader
+源代码:https://github.com/apache/doris-streamloader
 
 | 版本    | 日期      |  平台  |  链接  |
 |---|---|---|---|
@@ -122,16 +121,16 @@ doris-streamloader --source_file="data.csv" 
--url="http://localhost:8330"; --head
 | --u      | 数据库用户名      |  root    |      |
 | --p      | 数据库用户对应的密码   |  空字符串    |      |
 | --compress      | 导入数据是否在 HTTP 传输时压缩   |  false    |   保持默认,打开后压缩解压会分别增加工具和 
Doris BE 的 CPU 压力,所以仅在数据源所在机器网络带宽瓶颈时打开   |
-|--timeout    | 向 Doris 发送 HTTP 请求的超时时间, 单位:秒   |  60\*60\*10    | 保持默认   |
-| --batch      | 文件批量读取和发送的粒度, 单位: 行      |  4096    |  保持默认    |
-| --batch_byte      | 文件批量读取和发送的粒度, 单位: byte      |  943718400 (900MB)    |  
保持默认    |
-| --workers   | 导入的并发数   |  0    |   设置成 0 为自动模式,会根据导入数据的大小,磁盘的吞吐量,Stream Load 
导入速度计算一个值。 也可以手动设置,性能好的集群可以设置大点,最好不要超过 10。如果观察到导入内存过高(通过观察 Memtracker 或者 Exceed 
日志), 则可适当降低 worker 数量   |
-| --disk_throughput      | 磁盘的吞吐量,单位 MB/s   |  800    |  通常保持默认即可。该值参与 
--workers 的自动推算过程。 如果希望通过工具能计算出一个适当的 workers 数,可以根据实际磁盘吞吐设置。  |
-|--streamload_throughput | Stream Load 导入实际的吞吐大小,单位 MB/s | 100 | 通常保持默认即可。该值参与 
--workers 的自动推算过程。 默认值是通过每日性能测试环境给出的 Stream Load 吞吐量以及性能可预测性得出的。 
如果希望通过工具能计算出一个适当的 workers 数,可以设置实测的 Stream Load 
的吞吐,即:(LoadBytes\*1000)/(LoadTimeMs\*1024\*1024) 计算出实际的吞吐量 |
+|--timeout    | 向 Doris 发送 HTTP 请求的超时时间,单位:秒   |  60\*60\*10    | 保持默认   |
+| --batch      | 文件批量读取和发送的粒度,单位:行      |  4096    |  保持默认    |
+| --batch_byte      | 文件批量读取和发送的粒度,单位:byte      |  943718400 (900MB)    |  
保持默认    |
+| --workers   | 导入的并发数   |  0    |   设置成 0 为自动模式,会根据导入数据的大小,磁盘的吞吐量,Stream Load 
导入速度计算一个值。也可以手动设置,性能好的集群可以设置大点,最好不要超过 10。如果观察到导入内存过高(通过观察 Memtracker 或者 Exceed 
日志), 则可适当降低 worker 数量   |
+| --disk_throughput      | 磁盘的吞吐量,单位 MB/s   |  800    |  通常保持默认即可。该值参与 
--workers 的自动推算过程。如果希望通过工具能计算出一个适当的 workers 数,可以根据实际磁盘吞吐设置。  |
+|--streamload_throughput | Stream Load 导入实际的吞吐大小,单位 MB/s | 100 | 通常保持默认即可。该值参与 
--workers 的自动推算过程。默认值是通过每日性能测试环境给出的 Stream Load 
吞吐量以及性能可预测性得出的。如果希望通过工具能计算出一个适当的 workers 数,可以设置实测的 Stream Load 
的吞吐,即:(LoadBytes\*1000)/(LoadTimeMs\*1024\*1024) 计算出实际的吞吐量 |
 | --max_byte_per_task      | 每个导入任务数据量的最大大小,超过这个值剩下的数据会被拆分到一个新的导入任务中。  |  
107374182400 (100G)    |  建议设置一个很大的值来减少导入的版本数。但如果遇到 body exceed max size 
错误且不想调整 streaming_load_max_mb 参数(需重启 be),又或是遇到 -238 TOO MANY SEGMENT 
错误,可以临时调小这个配置    |
-| --check_utf8 | <p>是否对导入数据的编码进行检查:</p>   <p> 1) false,那么不做检查直接将原始数据导入; 2) 
true,那么对数据中非 utf-8 编码的字符用 � 进行替代</p> | true |保持默认|
+| --check_utf8 | <p>是否对导入数据的编码进行检查:</p>   <p> 1)false,那么不做检查直接将原始数据导入; 
2)true,那么对数据中非 utf-8 编码的字符用 � 进行替代</p> | true |保持默认|
 |--debug |打印 Debug 日志 | false | 保持默认|
-|--auto_retry| 自动重传失败的 worker 序号和 task 序号的列表 | 空字符串 | 
仅导入失败时重传使用,正常导入无需关心。失败时会提示具体参数内容,复制执行即可。例:如果 --auto_retry="1,1,2,1" 则表示: 
需要重传的task为:第一个 worker 的第一个 task,第二个 worker 的第一个 task。 |
+|--auto_retry| 自动重传失败的 worker 序号和 task 序号的列表 | 空字符串 | 
仅导入失败时重传使用,正常导入无需关心。失败时会提示具体参数内容,复制执行即可。例:如果 --auto_retry="1,1,2,1" 则表示:需要重传的 
task 为:第一个 worker 的第一个 task,第二个 worker 的第一个 task。 |
 |--auto_retry_times | 自动重传的次数 | 3 | 保持默认,如果不想重传需要把这个值设置为 0 |
 |--auto_retry_interval | 自动重传的间隔 | 60 | 保持默认,如果 Doris 因宕机导致失败,建议根据实际 Doris 
重启的时间间隔来设置该值 |
 |--log_filename | 日志存储的位置 | "" | 
默认将日志打印到控制台上,如果要打印到日志文件中,可以设置存储日志文件的路径,如--log_filename = "/var/log" |
@@ -157,7 +156,7 @@ doris-streamloader --source_file="data.csv" 
--url="http://localhost:8330"; --head
 
 
 
-具体例子如下:
+具体例子如下:
 
 - 导入成功,成功信息如下: 
 
@@ -189,7 +188,7 @@ doris-streamloader --source_file="data.csv" 
--url="http://localhost:8330"; --head
   ./doris-streamloader --source_file 
/mnt/disk1/laihui/doris/tools/tpch-tools/bin/tpch-data/lineitem.tbl.1  
--url="http://127.0.0.1:8239"; --header="column_separator:|?columns: l_orderkey, 
l_partkey, l_suppkey, l_linenumber, l_quantity, l_extendedprice, l_discount, 
l_tax, l_returnflag,l_linestatus, 
l_shipdate,l_commitdate,l_receiptdate,l_shipinstruct,l_shipmode,l_comment,temp" 
--db="db" --table="lineitem1" -u root -p "" --compress=false --timeout=36000 
--workers=3 --batch=4096 --batch_byt [...]
   ```
   
-只需复制运行该命令即可,`auto_retry` 说明可参考, 并给出失败的结果信息:
+只需复制运行该命令即可,`auto_retry` 说明可参考,并给出失败的结果信息:
 
 ```Go
 Load Result: {
diff --git a/versioned_docs/version-2.0/data-operate/update/unique-update.md 
b/versioned_docs/version-2.0/data-operate/update/unique-update.md
index 7a8b504ceec7..2f8f27f9e500 100644
--- a/versioned_docs/version-2.0/data-operate/update/unique-update.md
+++ b/versioned_docs/version-2.0/data-operate/update/unique-update.md
@@ -24,4 +24,68 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-Coming soon
\ No newline at end of file
+The Update command is used to update data in Doris. It can only be executed on 
tables that follow the Unique data model.
+
+## Use cases
+
+- Modifying the values of rows that meet certain conditions.
+
+- This is suitable for updating a small amount of data that is not frequently 
updated.
+
+## Principles
+
+The Update command uses the filtering logic of the query engine's WHERE clause 
to select the rows that need to be updated from the target table. It then uses 
the inherent value column of the Unique data model to replace the old data with 
the new data. After modifying the selected rows, they are reinserted into the 
table, thereby achieving row-level updates.
+
+### Synchronization
+
+The Update syntax in Doris is synchronous. This means that once the Update 
statement is successfully executed, the update operation is completed, and the 
data is immediately visible.
+
+### Performance
+
+The performance of the Update statement depends on the number of rows to be 
updated and the efficiency of the condition used for retrieval.
+
+- Number of rows to be updated: The more rows that need to be updated, the 
slower the Update statement will be. Update is suitable for scenarios where 
only a few rows need to be modified, such as updating the values of individual 
rows. It is not recommended for bulk data modification.
+
+- Efficiency of the condition: The Update operation first reads the rows that 
satisfy the given condition. Therefore, if the condition can be efficiently 
retrieved, the update speed will be faster. It is recommended to have the 
condition column hit an index or perform partition and bucket pruning. This 
helps Doris to quickly locate the rows to be updated and improves update 
efficiency. It is strongly discouraged to have the condition column dependent 
on the value column.
+
+## Examples
+
+Assuming there is an order table in Doris, where the order ID is the key 
column and the order status and order amount are the value columns. 
+
+Here is an example of the data:
+
+| Order ID | Order Amount | Order Status |
+| -------- | ------------ | ------------ |
+| 1        | 100          | Pending      |
+
+```sql
++----------+--------------+--------------+
+| order_id | order_amount | order_status |
++----------+--------------+--------------+
+| 1        | 100          | Pending      |
++----------+--------------+--------------+
+1 row in set (0.01 sec)
+```
+
+Now, when a user clicks on the "Pay" button, the Doris system needs to update 
the order status of order ID '1' to 'To be shipped'. This requires the use of 
the Update functionality.
+
+```sql
+mysql> UPDATE test_order SET order_status = 'To be shipped' WHERE order_id = 1;
+Query OK, 1 row affected (0.11 sec)
+{'label':'update_20ae22daf0354fe0-b5aceeaaddc666c5', 'status':'VISIBLE', 
'txnId':'33', 'queryId':'20ae22daf0354fe0-b5aceeaaddc666c5'}
+```
+
+After the update, the result will be as follows:
+
+```sql
++----------+--------------+--------------+
+| order_id | order_amount | order_status |
++----------+--------------+--------------+
+| 1        | 100          | To be shipped|
++----------+--------------+--------------+
+1 row in set (0.01 sec)
+```
+
+## More details
+
+For more detailed syntax and usage information on data updates, please refer 
to the 
[Update](../../sql-manual/sql-reference/Data-Manipulation-Statements/Manipulation/UPDATE)
 command manual. You can also enter `HELP UPDATE` in the MySQL client 
command-line interface to get more help information.
\ No newline at end of file
diff --git a/versioned_docs/version-2.0/query/query-data/encryption-function.md 
b/versioned_docs/version-2.0/query/query-data/encryption-function.md
index 4c73a73bc9d6..d35c4da69469 100644
--- a/versioned_docs/version-2.0/query/query-data/encryption-function.md
+++ b/versioned_docs/version-2.0/query/query-data/encryption-function.md
@@ -24,4 +24,181 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-Coming Soon
+Doris provides the following built-in encryption and masking functions. For 
detailed usage, please refer to the SQL manual.
+
+## AES_ENCRYPT
+
+An AES encryption function. 
+
+This function behaves the same as the` AES_ENCRYPT` function in MySQL. It uses 
the AES_128_ECB algorithm by default, with PKCS7 padding mode. Encryption is 
performed using the OpenSSL library as the underlying mechanism. Reference: 
https://dev.mysql.com/doc/refman/8.0/en/encryption-functions.html#function_aes-decrypt
+
+```sql
+select to_base64(aes_encrypt('text','F3229A0B371ED2D9441B830D21A390C3'));
+
++--------------------------------+
+| to_base64(aes_encrypt('text')) |
++--------------------------------+
+| wr2JEDVXzL9+2XtRhgIloA==       |
++--------------------------------+
+1 row in set (0.01 sec)
+```
+
+## AES_DECRYPT
+
+An AES decryption function. This function behaves the same as the 
`AES_DECRYPT` function in MySQL. It uses the AES_128_ECB algorithm by default, 
with PKCS7 padding mode. Decryption is performed using the OpenSSL library as 
the underlying mechanism.
+
+```sql
+select 
aes_decrypt(from_base64('wr2JEDVXzL9+2XtRhgIloA=='),'F3229A0B371ED2D9441B830D21A390C3');
++------------------------------------------------------+
+| aes_decrypt(from_base64('wr2JEDVXzL9+2XtRhgIloA==')) |
++------------------------------------------------------+
+| text                                                 |
++------------------------------------------------------+
+1 row in set (0.01 sec)
+```
+
+## MD5
+
+Calculates the MD5 128-bit hash.
+
+```sql
+MySQL [(none)]> select md5("abc");
++----------------------------------+
+| md5('abc')                       |
++----------------------------------+
+| 900150983cd24fb0d6963f7d28e17f72 |
++----------------------------------+
+1 row in set (0.013 sec)
+```
+
+## MD5SUM
+
+Calculates the MD5 128-bit hash for multiple strings.
+
+```sql
+MySQL > select md5("abcd");
++----------------------------------+
+| md5('abcd')                      |
++----------------------------------+
+| e2fc714c4727ee9395f324cd2e7f331f |
++----------------------------------+
+1 row in set (0.011 sec)
+
+MySQL > select md5sum("ab","cd");
++----------------------------------+
+| md5sum('ab', 'cd')               |
++----------------------------------+
+| e2fc714c4727ee9395f324cd2e7f331f |
++----------------------------------+
+1 row in set (0.008 sec)
+```
+
+## SM4_ENCRYPT
+
+SM4 encryption function.
+
+```sql
+MySQL > select 
TO_BASE64(SM4_ENCRYPT('text','F3229A0B371ED2D9441B830D21A390C3'));
++--------------------------------+
+| to_base64(sm4_encrypt('text')) |
++--------------------------------+
+| aDjwRflBrDjhBZIOFNw3Tg==       |
++--------------------------------+
+1 row in set (0.010 sec)
+
+MySQL > set block_encryption_mode="SM4_128_CBC";
+Query OK, 0 rows affected (0.001 sec)
+
+MySQL > select 
to_base64(SM4_ENCRYPT('text','F3229A0B371ED2D9441B830D21A390C3', '0123456789'));
++----------------------------------------------------------------------------------+
+| to_base64(sm4_encrypt('text', 'F3229A0B371ED2D9441B830D21A390C3', 
'0123456789')) |
++----------------------------------------------------------------------------------+
+| G7yqOKfEyxdagboz6Qf01A==                                                     
    |
++----------------------------------------------------------------------------------+
+1 row in set (0.014 sec)
+```
+
+## SM3
+
+Calculates the SM3 256-bit hash for multiple strings.
+
+```sql
+MySQL > select sm3("abcd");
++------------------------------------------------------------------+
+| sm3('abcd')                                                      |
++------------------------------------------------------------------+
+| 82ec580fe6d36ae4f81cae3c73f4a5b3b5a09c943172dc9053c69fd8e18dca1e |
++------------------------------------------------------------------+
+1 row in set (0.009 sec)
+```
+
+## SM3SUM
+
+Calculates the SM3 256-bit hash for multiple strings.
+
+```sql
+MySQL > select sm3("abcd");
++------------------------------------------------------------------+
+| sm3('abcd')                                                      |
++------------------------------------------------------------------+
+| 82ec580fe6d36ae4f81cae3c73f4a5b3b5a09c943172dc9053c69fd8e18dca1e |
++------------------------------------------------------------------+
+1 row in set (0.009 sec)
+
+MySQL > select sm3sum("ab","cd");
++------------------------------------------------------------------+
+| sm3sum('ab', 'cd')                                               |
++------------------------------------------------------------------+
+| 82ec580fe6d36ae4f81cae3c73f4a5b3b5a09c943172dc9053c69fd8e18dca1e |
++------------------------------------------------------------------+
+1 row in set (0.009 sec)
+```
+
+## SHA
+
+Calculates the SHA1 hash using the SHA1 algorithm.
+
+## SHA2
+
+Calculates the SHA2 hash using SHA2 algorithm.
+
+```sql
+mysql> select sha2('abc', 224);
++----------------------------------------------------------+
+| sha2('abc', 224)                                         |
++----------------------------------------------------------+
+| 23097d223405d8228642a477bda255b32aadbce4bda0b3f7e36c9da7 |
++----------------------------------------------------------+
+1 row in set (0.13 sec)
+
+mysql> select sha2('abc', 384);
++--------------------------------------------------------------------------------------------------+
+| sha2('abc', 384)                                                             
                    |
++--------------------------------------------------------------------------------------------------+
+| 
cb00753f45a35e8bb5a03d699ac65007272c32ab0eded1631a8b605a43ff5bed8086072ba1e7cc2358baeca134c825a7
 |
++--------------------------------------------------------------------------------------------------+
+1 row in set (0.13 sec)
+
+mysql> select sha2(NULL, 512);
++-----------------+
+| sha2(NULL, 512) |
++-----------------+
+| NULL            |
++-----------------+
+1 row in set (0.09 sec)
+```
+
+## DIGITAL_MASKING
+
+An alias function with the original function being 
`CONCAT(LEFT(id,3),'****',RIGHT(id,4))`. Performs data masking on the input 
`digital_number` and returns the masked result. 
+
+The `digital_number` is of type `BIGINT`.
+
+```sql
+mysql select digital_masking(13812345678);
++------------------------------+
+| digital_masking(13812345678) |
++------------------------------+
+| 138****5678                  |
++------------------------------+
+```
diff --git a/versioned_docs/version-2.0/query/query-data/mysql-compatibility.md 
b/versioned_docs/version-2.0/query/query-data/mysql-compatibility.md
index eda4820139d6..77b7bf92d4d9 100644
--- a/versioned_docs/version-2.0/query/query-data/mysql-compatibility.md
+++ b/versioned_docs/version-2.0/query/query-data/mysql-compatibility.md
@@ -24,4 +24,334 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-Coming Soon
+Doris is highly compatible with MySQL syntax and supports standard SQL. 
However, there are several differences between Doris and MySQL, as outlined 
below.
+
+## Data Types
+
+### Numeric Types
+
+| Type         | MySQL                                                        
| Doris                                                        |
+| ------------ | ------------------------------------------------------------ 
| ------------------------------------------------------------ |
+| Boolean      | <p>- Supported</p>  <p>- Range: 0 represents false, 1 
represents true</p>  | <p>- Supported</p>  <p>- Keyword: Boolean</p>  <p>- 
Range: 0 represents false, 1 represents true</p> |
+| Bit          | <p>- Supported</p>  <p>- Range: 1 to 64</p>                   
             | Not supported                                                |
+| Tinyint      | <p>- Supported</p> <p>- Supports signed and unsigned</p>  
<p>- Range:</p>    <p>- signed: -128 to 127</p>   <p>- unsigned: 0 to 255</p> | 
<p>- Supported</p>  <p>- Only supports signed</p>  <p>- Range: -128 to 127</p>  
  |
+| Smallint     | <p>- Supported</p> <p>- Supports signed and unsigned</p> <p> 
- Range:</p>    <p>- signed: -2^15 to 2^15-1</p>   <p>- unsigned: 0 to 
2^16-1</p> | <p>- Supported</p>  <p>- Only supports signed</p>  <p>- Range: 
-32768 to 32767</p> |
+| Mediumint    | <p>- Supported</p> <p>- Supports signed and unsigned</p>  
<p>- Range:</p>    <p>- signed: -2^23 to 2^23-1</p>  <p>- unsigned: 0 to 
-2^24-1</p> | - Not supported                                              |
+| Int          | <p>- Supported</p> <p>- Supports signed and unsigned</p>  
<p>- Range:</p>    <p>- signed: -2^31 to 2^31-1</p>   <p>- unsigned: 0 to 
-2^32-1</p> | <p>- Supported</p>  <p>- Only supports signed</p>  <p>- Range: 
-2147483648 to 2147483647</p> |
+| Bigint       | <p>- Supported</p> <p>- Supports signed and unsigned</p> <p>- 
Range:</p>    <p>- signed: -2^63 to 2^63-1</p>  <p>- unsigned: 0 to 2^64-1</p> 
| <p>- Supported</p>  <p>- Only supports signed</p>  <p>- Range: -2^63 to 
2^63-1</p> |
+| Largeint     | - Not supported                                              
| <p>- Supported</p>  <p>- Only supports signed</p>  <p>- Range: -2^127 to 
2^127-1</p> |
+| Decimal      | <p>- Supported</p>  <p>- Supports signed and unsigned 
(deprecated after 8.0.17)</p>  <p>- Default: Decimal(10, 0)</p> | <p>- 
Supported</p>  <p>- Only supports signed</p>  <p>- Default: Decimal(9, 0)</p> |
+| Float/Double | <p>-Supported</p>  <p>- Supports signed and unsigned 
(deprecated after 8.0.17)</p> | <p>- Supported</p>  <p>- Only supports 
signed</p>                          |
+
+### Date Types
+
+| Type      | MySQL                                                        | 
Doris                                                        |
+| --------- | ------------------------------------------------------------ | 
------------------------------------------------------------ |
+| Date      | <p>- Supported</p> <p>- Range: ['1000-01-01', '9999-12-31']</p>  
 - Format: YYYY-MM-DD | <p>- Supported</p> <p>- Range: ['0000-01-01', 
'9999-12-31']</p>   - Format: YYYY-MM-DD |
+| DateTime  | <p>- Supported</p> <p>- DATETIME([P]), where P is an optional 
parameter defined precision</p>  - Range: '1000-01-01 00:00:00.000000' to 
'9999-12-31 23:59:59.999999'  <p>- Format: YYYY-MM-DD hh:mm:ss[.fraction]</p> | 
<p>- Supported</p> <p>- DATETIME([P]), where P is an optional parameter defined 
precision</p>  <p>- Range: ['0000-01-01 00:00:00[.000000]', '9999-12-31 
23:59:59[.999999]']</p>   - Format: YYYY-MM-DD hh:mm:ss[.fraction] |
+| Timestamp | <p>- Supported</p> <p>- Timestamp[(p)], where P is an optional 
parameter defined precision</p> <p>- Range: ['1970-01-01 00:00:01.000000' UTC, 
'2038-01-19 03:14:07.999999' UTC]</p>   <p>- Format: YYYY-MM-DD 
hh:mm:ss[.fraction]</p> | - Not supported                                       
       |
+| Time      | <p>- Supported</p> <p>- Time[(p)]</p>  <p>- Range: 
['-838:59:59.000000' to '838:59:59.000000']</p>   <p>- Format: 
hh:mm:ss[.fraction]</p> | - Not supported                                       
       |
+| Year      | <p>- Supported</p> <p>- Range: 1901 to 2155, or 0000</p>   - 
Format: yyyy  | - Not supported                                              |
+
+### String Types
+
+| Type      | MySQL                                                        | 
Doris                                                        |
+| --------- | ------------------------------------------------------------ | 
------------------------------------------------------------ |
+| Char      | <p>-Supported - CHAR[(M)], where M is the character length. If 
omitted, default length is 1</p>  <p>- Fixed-length</p>  - Range: [0, 255] 
bytes | <p>- Supported</p> <p>- CHAR[(M)], where M is the byte length</p>  <p>- 
Variable-length</p>  - Range: [1, 255] |
+| Varchar   | <p>- Supported</p> <p>- VARCHAR(M), where M is the character 
length</p> <p>- Range: [0, 65535] bytes</p> | <p>- Supported</p> <p>- 
VARCHAR(M), where M is the byte length</p>  <p>- Range: [1, 65533]</p> |
+| String    | - Not supported                                              | 
<p>- Supported</p> <p>- 1,048,576 bytes (1MB), can be increased to 
2,147,483,643 bytes (2GB)</p> |
+| Binary    | <p>- Supported</p> <p>- Similar to Char</p>                      
          | - Not supported                                              |
+| Varbinary | <p>- Supported</p> <p>- Similar to Varchar</p>                   
          | <p>- Not supported</p>                                              
|
+| Blob      | <p>- Supported</p> <p>- TinyBlob, Blob, MediumBlob, LongBlob</p> 
          | - Not supported                                              |
+| Text      | <p>- Supported</p> <p>- TinyText, Text, MediumText, LongText</p> 
          | - Not supported                                              |
+| Enum      | <p>- Supported</p> <p>- Supports up to 65,535 elements</p>       
          | - Not supported                                              |
+| Set       | <p>- Supported</p> <p>- Supports up to 64 elements</p>           
          | - Not supported                                              |
+
+### JSON Type
+
+| Type | MySQL       | Doris     |
+| ---- | ----------- | --------- |
+| JSON | - Supported | Supported |
+
+### Doris unique data type
+
+Doris has several unique data types. Here are the details:
+
+- **HyperLogLog**
+
+  HLL (HyperLogLog) is a data type that cannot be used as a key column. It can 
be used in aggregate, duplicate, and unique models. In an aggregate model 
table, the corresponding aggregation type for HLL is HLL_UNION. The length and 
default value do not need to be specified. The length is controlled internally 
based on the data aggregation level. HLL columns can only be queried or used 
with `hll_union_agg`, `hll_raw_agg`, `hll_cardinality`, `hll_hash`, and other 
related functions. 
+
+  HLL is used for approximate fuzzy deduplication and performs better than 
count distinct when dealing with large amounts of data. The typical error rate 
of HLL is around 1%, sometimes reaching up to 2%.
+
+- **Bitmap**
+
+  Bitmap is another data type in Doris. It can be used in aggregate, unique, 
or duplicate models. In Unique or Duplicate models, it must be used as a 
non-key column. In aggregate models, it must also be used as a non-key column, 
and the corresponding aggregation type during table creation is BITMAP_UNION. 
Similar to HLL, the length and default values do not need to be specified, and 
the length is controlled internally based on the data aggregation level. Bitmap 
columns can only be querie [...]
+
+  Using BITMAP in traditional scenarios may impact loading speed, but it 
generally performs better than Count Distinct when dealing with large amounts 
of data. Please note that in real-time scenarios, using BITMAP without a global 
dictionary and with bitmap_hash() function may introduce an error of around 
0.1%. If this error is not acceptable, you can use bitmap_hash64 instead.
+
+- **QUANTILE_PERCENT**
+
+  QUANTILE_STATE is another data type in Doris, which cannot be used as a key 
column. It can be used in aggregate, duplicate, and iuique models. In an 
aggregate model table, the corresponding aggregation type for QUANTILE_STATE is 
QUANTILE_UNION. The length and default value do not need to be specified, and 
the length is controlled internally based on the data aggregation level. 
QUANTILE_STATE columns can only be queried or used with functions like 
`QUANTILE_PERCENT`, `QUANTILE_UNION`, ` [...]
+
+  QUANTILE_STATE is used for calculating approximate quantile values. During 
import, it performs pre-aggregation on the same key with different values. When 
the number of values does not exceed 2048, it stores all the data in detail. 
When the number of values exceeds 2048, it uses the TDigest algorithm to 
aggregate (cluster) the data and save the centroids of the clusters.
+
+- **Array<T\>**
+
+  Array is a data type in Doris that represents an array composed of elements 
of type T. It cannot be used as a key column. Currently, it supports usage in 
duplicate models and non-key column usage in unique models. 
+
+  The supported types for T are `BOOLEAN`, `TINYINT`, `SMALLINT`, `INT`, 
`BIGINT`, `LARGEINT`, `FLOAT`, `DOUBLE`, `DECIMAL`, `DATE`, DATETIME, CHAR, 
VARCHAR, and STRING.
+
+- **MAP<K, V\>**
+
+  MAP is a data type in Doris that represents a map composed of elements of 
types K and V. It cannot be used as a key column and can be used in both 
duplicate and unique models. 
+
+  The supported types for K and V are `BOOLEAN`, `TINYINT`, `SMALLINT`, `INT`, 
`BIGINT`, `LARGEINT`, `FLOAT`, `DOUBLE`, `DECIMAL`, `DATE`, `DATETIME`, `CHAR`, 
`VARCHAR`, and `STRING`.
+
+- **STRUCT<field_name:field_type,...>**
+
+  A structure (STRUCT) is composed of multiple fields. It can also be 
identified as a collection of multiple columns. It cannot be used as a key and 
is currently only supported in tables of the duplicate model.
+
+  - field_name: The identifier of the field, which must be unique.
+  
+  - field_type: The type of field.
+
+  The supported types for fields are `BOOLEAN`, `TINYINT`, `SMALLINT`, `INT`, 
`BIGINT`, `LARGEINT`, `FLOAT`, `DOUBLE`, `DECIMAL`, `DATE`, `DATETIME`, `CHAR`, 
`VARCHAR`, and `STRING`.
+
+- Agg_State
+
+ AGG_STATE is a data type in Doris that cannot be used as a key column. During 
table creation, the signature of the aggregation function needs to be declared. 
+
+  The length and default value do not need to be specified, and the actual 
storage size depends on the implementation of the function.
+
+  AGG_STATE can only be used in combination with 
[state](../../sql-manual/sql-functions/combinators/state) 
/[merge](../../sql-manual/sql-functions/combinators/merge)/[union](../../sql-manual/sql-functions/combinators/union)
 functions from the SQL manual for aggregators.
+
+## Syntax
+
+### DDL
+
+**01 Create Table Syntax in Doris**
+
+```SQL
+CREATE TABLE [IF NOT EXISTS] [database.]table
+(
+    column_definition_list
+    [, index_definition_list]
+)
+[engine_type]
+[keys_type]
+[table_comment]
+[partition_info]
+distribution_desc
+[rollup_list]
+[properties]
+[extra_properties]
+```
+
+**02 Differences with MySQL**
+
+- column_definition_list:
+  
+  - Defines the list of columns, and the basic syntax is similar to MySQL. 
However, there are additional operations for **aggregation types**.
+  
+  - The **aggregation types** mainly support data models such as AGGREGATE and 
Duplicate.
+  
+  - In MySQL, you can define constraints like primary key and unique key after 
each column in the column definition list. In Doris, these constraints are 
defined and calculated through data models.
+
+- index_definition_list:
+  
+  - Defines the list of indexes, and the basic syntax is similar to MySQL. 
Doris supports bitmap indexes, inverted indexes, and N-Gram indexes, while 
Bloom filter indexes are set through properties.
+  
+  - MySQL supports B+Tree and Hash indexes.
+
+- engine_type:
+  
+  - Specifies the table engine type, and it is optional.
+  
+  - Currently, Doris mainly supports native engines like OLAP.
+  
+  - MySQL supports storage engines like InnoDB and MyISAM.
+
+- keys_type:
+  
+  - Specifies the data model, and it is optional.
+  
+  - Supported types are:
+  
+    - DUBLICATE KEY (default): The specified columns are sorting columns.
+  
+    - AGGREGATE KEY: The specified columns are dimension columns.
+  
+    - UNIQUE KEY: The specified columns are primary key columns.
+  
+  - MySQL does not have the concept of data models.
+
+- table_comment:
+  
+  - Table comment or description.
+
+- partition_info:
+  
+  - Specifies the partitioning algorithm, and it is optional.
+  
+  - Supported partitioning algorithms are:
+  
+    - LESS THAN: Defines only the upper bound of the partition. The lower 
bound is determined by the upper bound of the previous partition.
+    
+    - FIXED RANGE: Defines a closed-open interval for the partition.
+    
+    - MULTI RANGE: Creates multiple RANGE partitions in batches, defines 
closed-open intervals, sets time units and steps. Time units supported are 
year, month, day, week, and hour.
+    
+    - MULTI RANGE: Creates multiple RANGE partitions for numeric types, 
defines closed-open intervals, and sets steps.
+  
+  - MySQL supports algorithms like Hash, Range, and List. It also supports 
subpartitions, but only with the Hash algorithm.
+
+- distribution_desc:
+  
+  - Specifies the bucketing algorithm, and it is mandatory.
+  
+  - Bucketing algorithms:
+  
+    - Hash bucketing syntax: DISTRIBUTED BY HASH (k1[,k2 ...]) [BUCKETS 
num|auto]. It uses the specified key columns for hash bucketing.
+  
+    - Random bucketing syntax: DISTRIBUTED BY RANDOM [BUCKETS num|auto]. It 
uses random numbers for bucketing.
+  
+  - MySQL does not have bucketing algorithms.
+
+- rollup_list:
+ 
+  - Allows creating multiple materialized views while creating the table, and 
it is optional.
+ 
+  - Syntax: rollup_name (col1[, col2, ...]) [DUPLICATE KEY(col1[, col2, ...])] 
[PROPERTIES("key" = "value")]
+ 
+  - MySQL does not support this feature.
+
+- properties:
+ 
+  - Table properties.
+ 
+  - Table properties in Doris are different from MySQL, and the syntax for 
defining table properties is also different from MySQL.
+
+**03 Create-Index**
+
+```sql
+CREATE INDEX [IF NOT EXISTS] index_name ON table_name (column [, ...],) [USING 
BITMAP];
+```
+
+- Doris currently supports Bitmap index, Inverted index, and N-Gram index. 
BloomFilter index are supported as well, but they have a separate syntax for 
setting them.
+
+- MySQL supports index algorithms such as B+Tree and Hash.
+
+**04 Create-View**
+
+```sql
+CREATE VIEW [IF NOT EXISTS]
+ [db_name.]view_name
+ (column1[ COMMENT "col comment"][, column2, ...])
+AS query_stmt
+
+CREATE MATERIALIZED VIEW (IF NOT EXISTS)? mvName=multipartIdentifier
+        (LEFT_PAREN cols=simpleColumnDefs RIGHT_PAREN)? buildMode?
+        (REFRESH refreshMethod? refreshTrigger?)?
+        (KEY keys=identifierList)?
+        (COMMENT STRING_LITERAL)?
+        (PARTITION BY LEFT_PAREN partitionKey = identifier RIGHT_PAREN)?
+        (DISTRIBUTED BY (HASH hashKeys=identifierList | RANDOM) (BUCKETS 
(INTEGER_VALUE | AUTO))?)?
+        propertyClause?
+        AS query
+```
+
+- The basic syntax is consistent with MySQL.
+
+- Doris supports two types of materialized views: synchronous materialized 
views and asynchronous materialized views (supported for v2.1). The 
asynchronous materialized views in Doris are more powerful.
+
+- MySQL only supports asynchronous materialized views.
+
+**05 Alter-Table/Alter-Index**
+
+The syntax of Doris ALTER is basically the same as that of MySQL.
+
+### **Drop-Table/Drop-Index**
+
+The syntax of Doris DROP is basically the same as MySQL.
+
+### **DML**
+
+**Insert**
+
+```sql
+INSERT INTO table_name
+    [ PARTITION (p1, ...) ]
+    [ WITH LABEL label]
+    [ (column [, ...]) ]
+    [ [ hint [, ...] ] ]
+    { VALUES ( { expression | DEFAULT } [, ...] ) [, ...] | query }
+```
+
+The Doris INSERT syntax is basically the same as MySQL.
+
+**Update**
+
+```sql
+UPDATE target_table [table_alias]
+    SET assignment_list
+    WHERE condition
+
+assignment_list:
+    assignment [, assignment] ...
+
+assignment:
+    col_name = value
+
+value:
+    {expr | DEFAULT}
+```
+
+The Doris UPDATE syntax is basically the same as MySQL, but it should be noted 
that the **`WHERE` condition must be added.**
+
+**Delete**
+
+```sql
+DELETE FROM table_name [table_alias] 
+    [PARTITION partition_name | PARTITIONS (partition_name [, partition_name])]
+    WHERE column_name op { value | value_list } [ AND column_name op { value | 
value_list } ...];
+```
+
+The syntax can only specify filter predicates
+
+```sql
+DELETE FROM table_name [table_alias]
+    [PARTITION partition_name | PARTITIONS (partition_name [, partition_name])]
+    [USING additional_tables]
+    WHERE condition
+```
+
+This syntax can only be used on the UNIQUE KEY model table.
+
+The Doris DELTE syntax is basically the same as MySQL. Due to Doris is an 
analytical database, deletions can't be too frequent.
+
+**Select**
+
+```sql
+SELECT
+    [hint_statement, ...]
+    [ALL | DISTINCT | DISTINCTROW | ALL EXCEPT ( col_name1 [, col_name2, 
col_name3, ...] )]
+    select_expr [, select_expr ...]
+    [FROM table_references
+      [PARTITION partition_list]
+      [TABLET tabletid_list]
+      [TABLESAMPLE sample_value [ROWS | PERCENT]
+        [REPEATABLE pos_seek]]
+    [WHERE where_condition]
+    [GROUP BY [GROUPING SETS | ROLLUP | CUBE] {col_name | expr | position}]
+    [HAVING where_condition]
+    [ORDER BY {col_name | expr | position}
+      [ASC | DESC], ...]
+    [LIMIT {[offset,] row_count | row_count OFFSET offset}]
+    [INTO OUTFILE 'file_name']
+```
+
+The Doris SELECT syntax is basically the same as MySQL.
+
+## SQL Function
+
+Doris Function covers most MySQL functions.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to