You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by lu...@apache.org on 2023/06/02 14:47:31 UTC

[doris] branch master updated: [DOCS](data-types) remove old types (#20375)

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.git


The following commit(s) were added to refs/heads/master by this push:
     new 0e06f15c87 [DOCS](data-types) remove old types (#20375)
0e06f15c87 is described below

commit 0e06f15c877e58797450da52abe87b575b8334da
Author: Gabriel <ga...@gmail.com>
AuthorDate: Fri Jun 2 22:47:22 2023 +0800

    [DOCS](data-types) remove old types (#20375)
---
 .../sql-manual/sql-reference/Data-Types/DATE.md    | 19 +++--
 .../sql-reference/Data-Types/DATETIME.md           | 17 +++-
 .../sql-reference/Data-Types/DATETIMEV2.md         | 47 -----------
 .../sql-manual/sql-reference/Data-Types/DATEV2.md  | 54 -------------
 .../sql-manual/sql-reference/Data-Types/DECIMAL.md | 60 ++++++++++++--
 .../sql-reference/Data-Types/DECIMALV3.md          | 92 ----------------------
 docs/sidebars.json                                 |  3 -
 .../sql-manual/sql-reference/Data-Types/DATE.md    | 27 ++++---
 .../sql-reference/Data-Types/DATETIME.md           | 18 ++++-
 .../sql-reference/Data-Types/DATETIMEV2.md         | 48 -----------
 .../sql-manual/sql-reference/Data-Types/DATEV2.md  | 50 ------------
 .../sql-manual/sql-reference/Data-Types/DECIMAL.md | 63 +++++++++++++--
 .../sql-reference/Data-Types/DECIMALV3.md          | 91 ---------------------
 13 files changed, 165 insertions(+), 424 deletions(-)

diff --git a/docs/en/docs/sql-manual/sql-reference/Data-Types/DATE.md b/docs/en/docs/sql-manual/sql-reference/Data-Types/DATE.md
index 83869ef94f..f7767a3498 100644
--- a/docs/en/docs/sql-manual/sql-reference/Data-Types/DATE.md
+++ b/docs/en/docs/sql-manual/sql-reference/Data-Types/DATE.md
@@ -25,28 +25,27 @@ under the License.
 -->
 
 ## DATE
-### Description
-DATE function
 
+<version since="1.2.0">
+
+DATE
+
+</version>
+
+### Description
 #### Syntax
-Date
-Convert input type to DATE type
 date
 Date type, the current range of values is ['0000-01-01','9999-12-31'], and the default print form is 'yyyy-MM-dd'.
 
-### note
-If you use version 1.2 and above, it is strongly recommended that you use the DATEV2 type instead of the DATE type as DATEV2 is more efficient than DATE type。
-
-We intend to delete this type in 2024. At this stage, Doris prohibits creating tables containing the `DATE` type by default. If you need to use it, you need to add `disable_datev1 = false` in the FE's config and restart the FE.
-
 ### example
 ```
 SELECT DATE('2003-12-31 01:02:03');
 +-----------------------------+
-| date('2003-12-31 01:02:03') |
+| DATE('2003-12-31 01:02:03') |
 +-----------------------------+
 | 2003-12-31                  |
 +-----------------------------+
 ```
+
 ### keywords
 DATE
diff --git a/docs/en/docs/sql-manual/sql-reference/Data-Types/DATETIME.md b/docs/en/docs/sql-manual/sql-reference/Data-Types/DATETIME.md
index 324384d119..78ea8f5499 100644
--- a/docs/en/docs/sql-manual/sql-reference/Data-Types/DATETIME.md
+++ b/docs/en/docs/sql-manual/sql-reference/Data-Types/DATETIME.md
@@ -25,14 +25,23 @@ under the License.
 -->
 
 ## DATETIME
-### Description
+
+<version since="1.2.0">
+
 DATETIME
-Date and time type, value range is ['0000-01-01 00:00:00','9999-12-31 23:59:59'].
-The form of printing is 'yyyy-MM-dd HH:mm:ss'
+
+</version>
+
+### Description
+DATETIME([P])
+Date and time type.
+The optional parameter P indicates the time precision and the value range is [0, 6], that is, it supports up to 6 decimal places (microseconds). 0 when not set.
+Value range is ['0000-01-01 00:00:00[.000000]','9999-12-31 23:59:59[.999999]'].
+The form of printing is 'yyyy-MM-dd HH:mm:ss.SSSSSS'
 
 ### note
 
-If you use version 1.2 and above, it is strongly recommended that you use DATETIMEV2 type instead of DATETIME type. Compared with DATETIME type, DATETIMEV2 is more efficient and supports time accuracy up to microseconds.
+DATETIME supports precision up to microseconds.
 
 ### keywords
 DATETIME
diff --git a/docs/en/docs/sql-manual/sql-reference/Data-Types/DATETIMEV2.md b/docs/en/docs/sql-manual/sql-reference/Data-Types/DATETIMEV2.md
deleted file mode 100644
index 73c56bc5da..0000000000
--- a/docs/en/docs/sql-manual/sql-reference/Data-Types/DATETIMEV2.md
+++ /dev/null
@@ -1,47 +0,0 @@
----
-{
-    "title": "DATETIMEV2",
-    "language": "en"
-}
----
-
-<!-- 
-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.
--->
-
-## DATETIMEV2
-
-<version since="1.2.0">
-
-DATETIMEV2
-
-</version>
-
-### Description
-DATETIMEV2([P])
-Date and time type.
-The optional parameter P indicates the time precision and the value range is [0, 6], that is, it supports up to 6 decimal places (microseconds). 0 when not set.
-Value range is ['0000-01-01 00:00:00[.000000]','9999-12-31 23:59:59[.999999]'].
-The form of printing is 'yyyy-MM-dd HH:mm:ss.SSSSSS'
-
-### note
-
-Compared with the DATETIME type, DATETIMEV2 is more efficient and supports a time precision of up to microseconds.
-
-### keywords
-DATETIMEV2
diff --git a/docs/en/docs/sql-manual/sql-reference/Data-Types/DATEV2.md b/docs/en/docs/sql-manual/sql-reference/Data-Types/DATEV2.md
deleted file mode 100644
index 8e686d1c6b..0000000000
--- a/docs/en/docs/sql-manual/sql-reference/Data-Types/DATEV2.md
+++ /dev/null
@@ -1,54 +0,0 @@
----
-{
-    "title": "DATEV2",
-    "language": "en"
-}
----
-
-<!-- 
-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.
--->
-
-## DATEV2
-
-<version since="1.2.0">
-
-DATEV2
-
-</version>
-
-### Description
-#### Syntax
-datev2
-DateV2 type, the current range of values is ['0000-01-01','9999-12-31'], and the default print form is 'yyyy-MM-dd'.
-
-### note
-DATEV2 type is more efficient than DATE type. During calculation, DATEV2 can save half of the memory usage compared with DATE.
-
-### example
-```
-SELECT CAST('2003-12-31 01:02:03' as DATEV2);
-+---------------------------------------+
-| CAST('2003-12-31 01:02:03' AS DATEV2) |
-+---------------------------------------+
-| 2003-12-31                            |
-+---------------------------------------+
-```
-
-### keywords
-DATE
diff --git a/docs/en/docs/sql-manual/sql-reference/Data-Types/DECIMAL.md b/docs/en/docs/sql-manual/sql-reference/Data-Types/DECIMAL.md
index a9e6ff8564..d7723bb9f7 100644
--- a/docs/en/docs/sql-manual/sql-reference/Data-Types/DECIMAL.md
+++ b/docs/en/docs/sql-manual/sql-reference/Data-Types/DECIMAL.md
@@ -25,18 +25,68 @@ under the License.
 -->
 
 ## DECIMAL
+
+<version since="1.2.1">
+
+DECIMAL
+
+</version>
+
 ### Description
 DECIMAL (M [,D])
 
-High-precision fixed-point, M stands for the total number of significant numbers (precision), D stands for the maximum number of decimal points (scale).
-The range of M is [1, 27], the range of D is [0, 9], the integer part is [1, 18].
+High-precision fixed-point number, M represents the total number of significant digits, and D represents the scale.
 
-in addition, M must be greater than or equal to the value of D. 
+The range of M is [1, 38], and the range of D is [0, precision].
 
 The default value is DECIMAL(9, 0).
 
-### note
-We intend to delete this type in 2024. At this stage, Doris prohibits creating tables containing the `DECIMAL` type by default. If you need to use it, you need to add `disable_decimalv2 = false` in the FE's config and restart the FE.
+### Precision Deduction
+
+DECIMAL has a very complex set of type inference rules. For different expressions, different rules will be applied for precision inference.
+
+#### Arithmetic Expressions
+
+* Plus / Minus: DECIMAL(a, b) + DECIMAL(x, y) -> DECIMAL(max(a - b, x - y) + max(b, y) + 1, max(b, y)).
+* Multiply: DECIMAL(a, b) + DECIMAL(x, y) -> DECIMAL(a + x, b + y).
+* Divide: DECIMAL(p1, s1) + DECIMAL(p2, s2) -> DECIMAL(p1 + s2 + div_precision_increment, s1 + div_precision_increment).div_precision_increment default 4.
+It is worth noting that the process of division calculation is as follows:
+DECIMAL(p1, s1) / DECIMAL(p2, s2) is first converted to DECIMAL(p1 + s2 + div_precision_increment, s1 + s2) / DECIMAL(p2, s2) and then the calculation is performed. Therefore, it is possible that DECIMAL(p1 + s2 + div_precision_increment, s1 + div_precision_increment) satisfies the range of DECIMAL, 
+but due to the conversion to DECIMAL(p1 + s2 + div_precision_increment, s1 + s2), 
+it exceeds the range. Currently, Doris handles this by converting it to Double for calculation.
+#### Aggregation functions
+
+* SUM / MULTI_DISTINCT_SUM: SUM(DECIMAL(a, b)) -> DECIMAL(38, b).
+* AVG: AVG(DECIMAL(a, b)) -> DECIMAL(38, max(b, 4)).
+
+#### Default rules
+
+Except for the expressions mentioned above, other expressions use default rules for precision deduction. That is, for the expression `expr(DECIMAL(a, b))`, the result type is also DECIMAL(a, b).
+
+#### Adjust the result precision
+
+Different users have different accuracy requirements for DECIMAL. The above rules are the default behavior of Doris. If users **have different accuracy requirements, they can adjust the accuracy in the following ways**:
+
+* If the expected result precision is greater than the default precision, you can adjust the result precision by adjusting the parameter's precision. For example, if the user expects to calculate `AVG(col)` and get DECIMAL(x, y) as the result, where the type of `col` is DECIMAL (a, b), the expression can be rewritten to `AVG(CAST(col as DECIMAL (x, y))`.
+* If the expected result precision is less than the default precision, the desired precision can be obtained by approximating the output result. For example, if the user expects to calculate `AVG(col)` and get DECIMAL(x, y) as the result, where the type of `col` is DECIMAL(a, b), the expression can be rewritten as `ROUND(AVG(col), y)`.
+
+### Why DECIMAL is required
+
+DECIMAL in Doris is a real high-precision fixed-point number. Decimal has the following core advantages:
+1. It can represent a wider range. The value ranges of both precision and scale in DECIMAL have been significantly expanded.
+2. Higher performance. The old version of DECIMAL requires 16 bytes in memory and 12 bytes in storage, while DECIMAL has made adaptive adjustments as shown below.
+```
++----------------------+------------------------------+
+|     precision        | Space occupied (memory/disk) |
++----------------------+------------------------------+
+| 0 < precision <= 9   |            4 bytes           |
++----------------------+------------------------------+
+| 9 < precision <= 18  |            8 bytes           |
++----------------------+------------------------------+
+| 18 < precision <= 38 |           16 bytes           |
++----------------------+------------------------------+
+```
+3. More complete precision deduction. For different expressions, different precision inference rules are applied to deduce the precision of the results.
 
 ### keywords
 DECIMAL
diff --git a/docs/en/docs/sql-manual/sql-reference/Data-Types/DECIMALV3.md b/docs/en/docs/sql-manual/sql-reference/Data-Types/DECIMALV3.md
deleted file mode 100644
index 21bbfa46b4..0000000000
--- a/docs/en/docs/sql-manual/sql-reference/Data-Types/DECIMALV3.md
+++ /dev/null
@@ -1,92 +0,0 @@
----
-{
-    "title": "DECIMALV3",
-    "language": "en"
-}
----
-
-<!-- 
-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.
--->
-
-## DECIMALV3
-
-<version since="1.2.1">
-
-DECIMALV3
-
-</version>
-
-### Description
-DECIMALV3 (M [,D])
-
-High-precision fixed-point number, M represents the total number of significant digits, and D represents the scale.
-
-The range of M is [1, 38], and the range of D is [0, precision].
-
-The default value is DECIMALV3(9, 0).
-
-### Precision Deduction
-
-DECIMALV3 has a very complex set of type inference rules. For different expressions, different rules will be applied for precision inference.
-
-#### Arithmetic Expressions
-
-* Plus / Minus: DECIMALV3(a, b) + DECIMALV3(x, y) -> DECIMALV3(max(a - b, x - y) + max(b, y) + 1, max(b, y)).
-* Multiply: DECIMALV3(a, b) + DECIMALV3(x, y) -> DECIMALV3(a + x, b + y).
-* Divide: DECIMALV3(p1, s1) + DECIMALV3(p2, s2) -> DECIMALV3(p1 + s2 + div_precision_increment, s1 + div_precision_increment).div_precision_increment default 4.
-It is worth noting that the process of division calculation is as follows:
-DECIMALV3(p1, s1) / DECIMALV3(p2, s2) is first converted to DECIMALV3(p1 + s2 + div_precision_increment, s1 + s2) / DECIMALV3(p2, s2) and then the calculation is performed. Therefore, it is possible that DECIMALV3(p1 + s2 + div_precision_increment, s1 + div_precision_increment) satisfies the range of DECIMALV3, 
-but due to the conversion to DECIMALV3(p1 + s2 + div_precision_increment, s1 + s2), 
-it exceeds the range. Currently, Doris handles this by converting it to Double for calculation.
-#### Aggregation functions
-
-* SUM / MULTI_DISTINCT_SUM: SUM(DECIMALV3(a, b)) -> DECIMALV3(38, b).
-* AVG: AVG(DECIMALV3(a, b)) -> DECIMALV3(38, max(b, 4)).
-
-#### Default rules
-
-Except for the expressions mentioned above, other expressions use default rules for precision deduction. That is, for the expression `expr(DECIMALV3(a, b))`, the result type is also DECIMALV3(a, b).
-
-#### Adjust the result precision
-
-Different users have different accuracy requirements for DECIMALV3. The above rules are the default behavior of Doris. If users **have different accuracy requirements, they can adjust the accuracy in the following ways**:
-
-* If the expected result precision is greater than the default precision, you can adjust the result precision by adjusting the parameter's precision. For example, if the user expects to calculate `AVG(col)` and get DECIMALV3(x, y) as the result, where the type of `col` is DECIMALV3 (a, b), the expression can be rewritten to `AVG(CAST(col as DECIMALV3 (x, y))`.
-* If the expected result precision is less than the default precision, the desired precision can be obtained by approximating the output result. For example, if the user expects to calculate `AVG(col)` and get DECIMALV3(x, y) as the result, where the type of `col` is DECIMALV3(a, b), the expression can be rewritten as `ROUND(AVG(col), y)`.
-
-### Why DECIMALV3 is required
-
-DECIMALV3 in Doris is a real high-precision fixed-point number. Compared with the old version of Decimal, DecimalV3 has the following core advantages:
-1. It can represent a wider range. The value ranges of both precision and scale in DECIMALV3 have been significantly expanded.
-2. Higher performance. The old version of DECIMAL requires 16 bytes in memory and 12 bytes in storage, while DECIMALV3 has made adaptive adjustments as shown below.
-```
-+----------------------+------------------------------+
-|     precision        | Space occupied (memory/disk) |
-+----------------------+------------------------------+
-| 0 < precision <= 9   |            4 bytes           |
-+----------------------+------------------------------+
-| 9 < precision <= 18  |            8 bytes           |
-+----------------------+------------------------------+
-| 18 < precision <= 38 |           16 bytes           |
-+----------------------+------------------------------+
-```
-3. More complete precision deduction. For different expressions, different precision inference rules are applied to deduce the precision of the results.
-
-### keywords
-DECIMALV3
diff --git a/docs/sidebars.json b/docs/sidebars.json
index a553542459..04e6dca9ec 100644
--- a/docs/sidebars.json
+++ b/docs/sidebars.json
@@ -1014,11 +1014,8 @@
                                 "sql-manual/sql-reference/Data-Types/FLOAT",
                                 "sql-manual/sql-reference/Data-Types/DOUBLE",
                                 "sql-manual/sql-reference/Data-Types/DECIMAL",
-                                "sql-manual/sql-reference/Data-Types/DECIMALV3",
                                 "sql-manual/sql-reference/Data-Types/DATE",
                                 "sql-manual/sql-reference/Data-Types/DATETIME",
-                                "sql-manual/sql-reference/Data-Types/DATEV2",
-                                "sql-manual/sql-reference/Data-Types/DATETIMEV2",
                                 "sql-manual/sql-reference/Data-Types/CHAR",
                                 "sql-manual/sql-reference/Data-Types/VARCHAR",
                                 "sql-manual/sql-reference/Data-Types/STRING",
diff --git a/docs/zh-CN/docs/sql-manual/sql-reference/Data-Types/DATE.md b/docs/zh-CN/docs/sql-manual/sql-reference/Data-Types/DATE.md
index 0e9ec71c11..ea4fa79fd2 100644
--- a/docs/zh-CN/docs/sql-manual/sql-reference/Data-Types/DATE.md
+++ b/docs/zh-CN/docs/sql-manual/sql-reference/Data-Types/DATE.md
@@ -25,21 +25,28 @@ under the License.
 -->
 
 ## DATE
+
+### name
+
+<version since="1.2.0">
+
+DATE
+
+</version>
+
 ### description
-    DATE函数
-        Syntax:
-            DATE(expr) 
-        将输入的类型转化为DATE类型
     DATE类型
         日期类型,目前的取值范围是['0000-01-01', '9999-12-31'], 默认的打印形式是'yyyy-MM-dd'
 
-### note
-    如果您使用1.2及以上版本,强烈推荐您使用DATEV2类型替代DATE类型。相比DATE类型,DATEV2更加高效。
-    我们打算在2024年删除这个类型,目前阶段,Doris默认禁止创建含有DATE类型的表,如果需要使用需要在FE的config中添加`disable_datev1 = false`,并重启FE。
-
 ### example
-    mysql> SELECT DATE('2003-12-31 01:02:03');
-        -> '2003-12-31'
+```
+SELECT DATE('2003-12-31 01:02:03');
++-----------------------------+
+| DATE('2003-12-31 01:02:03') |
++-----------------------------+
+| 2003-12-31                  |
++-----------------------------+
+```
 
 ### keywords
 
diff --git a/docs/zh-CN/docs/sql-manual/sql-reference/Data-Types/DATETIME.md b/docs/zh-CN/docs/sql-manual/sql-reference/Data-Types/DATETIME.md
index 33529d5156..e6d8ebdced 100644
--- a/docs/zh-CN/docs/sql-manual/sql-reference/Data-Types/DATETIME.md
+++ b/docs/zh-CN/docs/sql-manual/sql-reference/Data-Types/DATETIME.md
@@ -25,13 +25,23 @@ under the License.
 -->
 
 ## DATETIME
+
+<version since="1.2.0">
+
+DATATIMEV2
+
+</version>
+
 ### description
-    DATETIME
-    日期时间类型,取值范围是['0000-01-01 00:00:00', '9999-12-31 23:59:59'].
-    打印的形式是'yyyy-MM-dd HH:mm:ss'
+
+    DATETIME([P])
+    日期时间类型,可选参数P表示时间精度,取值范围是[0, 6],即最多支持6位小数(微秒)。不设置时为0。
+    取值范围是['0000-01-01 00:00:00[.000000]', '9999-12-31 23:59:59[.999999]'].
+    打印的形式是'yyyy-MM-dd HH:mm:ss.SSSSSS'
 
 ### note
-    如果您使用1.2及以上版本,强烈推荐您使用DATETIMEV2类型替代DATETIME类型。相比DATETIME类型,DATETIMEV2更加高效,并且支持了最多到微秒的时间精度。
+
+    DATETIME支持了最多到微秒的时间精度。
 
 ### keywords
 
diff --git a/docs/zh-CN/docs/sql-manual/sql-reference/Data-Types/DATETIMEV2.md b/docs/zh-CN/docs/sql-manual/sql-reference/Data-Types/DATETIMEV2.md
deleted file mode 100644
index 097989c65e..0000000000
--- a/docs/zh-CN/docs/sql-manual/sql-reference/Data-Types/DATETIMEV2.md
+++ /dev/null
@@ -1,48 +0,0 @@
----
-{
-    "title": "DATETIMEV2",
-    "language": "zh-CN"
-}
----
-
-<!-- 
-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.
--->
-
-## DATETIMEV2
-
-<version since="1.2.0">
-
-DATATIMEV2
-
-</version>
-
-### description
-
-    DATETIMEV2([P])
-    日期时间类型,可选参数P表示时间精度,取值范围是[0, 6],即最多支持6位小数(微秒)。不设置时为0。
-    取值范围是['0000-01-01 00:00:00[.000000]', '9999-12-31 23:59:59[.999999]'].
-    打印的形式是'yyyy-MM-dd HH:mm:ss.SSSSSS'
-
-### note
-
-    相比DATETIME类型,DATETIMEV2更加高效,并且支持了最多到微秒的时间精度。
-
-### keywords
-
-    DATETIMEV2
diff --git a/docs/zh-CN/docs/sql-manual/sql-reference/Data-Types/DATEV2.md b/docs/zh-CN/docs/sql-manual/sql-reference/Data-Types/DATEV2.md
deleted file mode 100644
index 3126eb416c..0000000000
--- a/docs/zh-CN/docs/sql-manual/sql-reference/Data-Types/DATEV2.md
+++ /dev/null
@@ -1,50 +0,0 @@
----
-{
-    "title": "DATEV2",
-    "language": "zh-CN"
-}
----
-
-<!-- 
-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.
--->
-
-## DATEV2
-
-### name
-
-<version since="1.2.0">
-
-DATEV2
-
-</version>
-
-### description
-    DATEV2类型
-        日期类型,目前的取值范围是['0000-01-01', '9999-12-31'], 默认的打印形式是'yyyy-MM-dd'
-
-### note
-    DATEV2类型相比DATE类型更加高效,在计算时,DATEV2相比DATE可以节省一半的内存使用量。
-
-### example
-    mysql> SELECT CAST('2003-12-31 01:02:03' as DATEV2);
-        -> '2003-12-31'
-
-### keywords
-
-    DATEV2
diff --git a/docs/zh-CN/docs/sql-manual/sql-reference/Data-Types/DECIMAL.md b/docs/zh-CN/docs/sql-manual/sql-reference/Data-Types/DECIMAL.md
index 9009f7710b..1fe5d6abd1 100644
--- a/docs/zh-CN/docs/sql-manual/sql-reference/Data-Types/DECIMAL.md
+++ b/docs/zh-CN/docs/sql-manual/sql-reference/Data-Types/DECIMAL.md
@@ -1,7 +1,7 @@
 ---
 {
-    "title": "DECIMAL",
-    "language": "zh-CN"
+"title": "DECIMAL",
+"language": "zh-CN"
 }
 ---
 
@@ -25,16 +25,67 @@ under the License.
 -->
 
 ## DECIMAL
+
+<version since="1.2.1">
+
+DECIMAL
+
+</version>
+
 ### description
     DECIMAL(M[,D])
     高精度定点数,M 代表一共有多少个有效数字(precision),D 代表小数位有多少数字(scale),
-    有效数字 M 的范围是 [1, 27],小数位数字数量 D 的范围是 [0, 9],整数位数字数量的范围是 [1, 18],
-    另外,M 必须要大于等于 D 的取值。
+    有效数字 M 的范围是 [1, 38],小数位数字数量 D 的范围是 [0, precision]。
 
     默认值为 DECIMAL(9, 0)。
 
-### note
-    我们打算在2024年删除这个类型,目前阶段,Doris默认禁止创建含有DECIMAL类型的表,如果需要使用需要在FE的config中添加`disable_decimalv2 = false`,并重启FE。
+### 精度推演
+
+DECIMAL有一套很复杂的类型推演规则,针对不同的表达式,会应用不同规则进行精度推断。
+
+#### 四则运算
+
+* 加法 / 减法:DECIMAL(a, b) + DECIMAL(x, y) -> DECIMAL(max(a - b, x - y) + max(b, y) + 1, max(b, y))。
+* 乘法:DECIMAL(a, b) + DECIMAL(x, y) -> DECIMAL(a + x, b + y)。
+* 除法:DECIMAL(p1, s1) + DECIMAL(p2, s2) -> DECIMAL(p1 + s2 + div_precision_increment, s1 + div_precision_increment)。div_precision_increment 默认为4。
+  值得注意的是,除法计算的过程是
+  DECIMAL(p1, s1) / DECIMAL(p2, s2) 先转换成 DECIMAL(p1 + s2 + div_precision_increment, s1 + s2 ) /  DECIMAL(p2, s2)  然后再进行计算,所以可能会出现
+  DECIMAL(p1 + s2 + div_precision_increment, s1 + div_precision_increment) 是满足DECIMAL的范围,但是由于先转换成了DECIMAL(p1 + s2 + div_precision_increment, s1 + s2 )
+  导致超出范围,目前Doris的处理是转成Double进行计算
+
+
+#### 聚合运算
+
+* SUM / MULTI_DISTINCT_SUM:SUM(DECIMAL(a, b)) -> DECIMAL(38, b)。
+* AVG:AVG(DECIMAL(a, b)) -> DECIMAL(38, max(b, 4))。
+
+#### 默认规则
+
+除上述提到的函数外,其余表达式都使用默认规则进行精度推演。即对于表达式 `expr(DECIMAL(a, b))`,结果类型同样也是DECIMAL(a, b)。
+
+#### 调整结果精度
+
+不同用户对DECIMAL的精度要求各不相同,上述规则为当前Doris的默认行为,如果用户**有不同的精度需求,可以通过以下方式进行精度调整**:
+1. 如果期望的结果精度大于默认精度,可以通过调整入参精度来调整结果精度。例如用户期望计算`AVG(col)`得到DECIMAL(x, y)作为结果,其中`col`的类型为DECIMAL(a, b),则可以改写表达式为`AVG(CAST(col as DECIMAL(x, y)))`。
+2. 如果期望的结果精度小于默认精度,可以通过对输出结果求近似得到想要的精度。例如用户期望计算`AVG(col)`得到DECIMAL(x, y)作为结果,其中`col`的类型为DECIMAL(a, b),则可以改写表达式为`ROUND(AVG(col), y)`。
+
+### 为什么需要DECIMAL
+
+Doris中的DECIMAL是真正意义上的高精度定点数,Decimal有以下核心优势:
+1. 可表示范围更大。DECIMAL中precision和scale的取值范围都进行了明显扩充。
+2. 性能更高。老版本的DECIMAL在内存中需要占用16 bytes,在存储中占用12 bytes,而DECIMAL进行了自适应调整(如下表格)。
+```
++----------------------+-------------------+
+|     precision        | 占用空间(内存/磁盘)|
++----------------------+-------------------+
+| 0 < precision <= 9   |      4 bytes      |
++----------------------+-------------------+
+| 9 < precision <= 18  |      8 bytes      |
++----------------------+-------------------+
+| 18 < precision <= 38 |     16 bytes      |
++----------------------+-------------------+
+```
+3. 更完备的精度推演。对于不同的表达式,应用不同的精度推演规则对结果的精度进行推演。
 
 ### keywords
     DECIMAL
diff --git a/docs/zh-CN/docs/sql-manual/sql-reference/Data-Types/DECIMALV3.md b/docs/zh-CN/docs/sql-manual/sql-reference/Data-Types/DECIMALV3.md
deleted file mode 100644
index 61fa0fc9f4..0000000000
--- a/docs/zh-CN/docs/sql-manual/sql-reference/Data-Types/DECIMALV3.md
+++ /dev/null
@@ -1,91 +0,0 @@
----
-{
-    "title": "DECIMALV3",
-    "language": "zh-CN"
-}
----
-
-<!-- 
-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.
--->
-
-## DECIMALV3
-
-<version since="1.2.1">
-
-DECIMALV3
-
-</version>
-
-### description
-    DECIMALV3(M[,D])
-    高精度定点数,M 代表一共有多少个有效数字(precision),D 代表小数位有多少数字(scale),
-    有效数字 M 的范围是 [1, 38],小数位数字数量 D 的范围是 [0, precision]。
-
-    默认值为 DECIMALV3(9, 0)。
-
-### 精度推演
-
-DECIMALV3有一套很复杂的类型推演规则,针对不同的表达式,会应用不同规则进行精度推断。
-
-#### 四则运算
-
-* 加法 / 减法:DECIMALV3(a, b) + DECIMALV3(x, y) -> DECIMALV3(max(a - b, x - y) + max(b, y) + 1, max(b, y))。
-* 乘法:DECIMALV3(a, b) + DECIMALV3(x, y) -> DECIMALV3(a + x, b + y)。
-* 除法:DECIMALV3(p1, s1) + DECIMALV3(p2, s2) -> DECIMALV3(p1 + s2 + div_precision_increment, s1 + div_precision_increment)。div_precision_increment 默认为4。
-值得注意的是,除法计算的过程是
-DECIMALV3(p1, s1) / DECIMALV3(p2, s2) 先转换成 DECIMALV3(p1 + s2 + div_precision_increment, s1 + s2 ) /  DECIMALV3(p2, s2)  然后再进行计算,所以可能会出现
-DECIMALV3(p1 + s2 + div_precision_increment, s1 + div_precision_increment) 是满足DECIMALV3的范围,但是由于先转换成了DECIMALV3(p1 + s2 + div_precision_increment, s1 + s2 )
-导致超出范围,目前Doris的处理是转成Double进行计算
-
-
-#### 聚合运算
-
-* SUM / MULTI_DISTINCT_SUM:SUM(DECIMALV3(a, b)) -> DECIMALV3(38, b)。
-* AVG:AVG(DECIMALV3(a, b)) -> DECIMALV3(38, max(b, 4))。
-
-#### 默认规则
-
-除上述提到的函数外,其余表达式都使用默认规则进行精度推演。即对于表达式 `expr(DECIMALV3(a, b))`,结果类型同样也是DECIMALV3(a, b)。
-
-#### 调整结果精度
-
-不同用户对DECIMALV3的精度要求各不相同,上述规则为当前Doris的默认行为,如果用户**有不同的精度需求,可以通过以下方式进行精度调整**:
-1. 如果期望的结果精度大于默认精度,可以通过调整入参精度来调整结果精度。例如用户期望计算`AVG(col)`得到DECIMALV3(x, y)作为结果,其中`col`的类型为DECIMALV3(a, b),则可以改写表达式为`AVG(CAST(col as DECIMALV3(x, y)))`。
-2. 如果期望的结果精度小于默认精度,可以通过对输出结果求近似得到想要的精度。例如用户期望计算`AVG(col)`得到DECIMALV3(x, y)作为结果,其中`col`的类型为DECIMALV3(a, b),则可以改写表达式为`ROUND(AVG(col), y)`。
-
-### 为什么需要DECIMALV3
-
-Doris中的DECIMALV3是真正意义上的高精度定点数,相比于老版本的Decimal,DecimalV3有以下核心优势:
-1. 可表示范围更大。DECIMALV3中precision和scale的取值范围都进行了明显扩充。
-2. 性能更高。老版本的DECIMAL在内存中需要占用16 bytes,在存储中占用12 bytes,而DECIMALV3进行了自适应调整(如下表格)。
-```
-+----------------------+-------------------+
-|     precision        | 占用空间(内存/磁盘)|
-+----------------------+-------------------+
-| 0 < precision <= 9   |      4 bytes      |
-+----------------------+-------------------+
-| 9 < precision <= 18  |      8 bytes      |
-+----------------------+-------------------+
-| 18 < precision <= 38 |     16 bytes      |
-+----------------------+-------------------+
-```
-3. 更完备的精度推演。对于不同的表达式,应用不同的精度推演规则对结果的精度进行推演。
-
-### keywords
-    DECIMALV3


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