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

zclll 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 dff67ad955c Fix wrong time conversion rules of non-restrict mode 
(#2708)
dff67ad955c is described below

commit dff67ad955c4abcf8da581a15b50e02b9d280def
Author: zclllyybb <[email protected]>
AuthorDate: Tue Aug 5 23:26:00 2025 +0800

    Fix wrong time conversion rules of non-restrict mode (#2708)
    
    ## Versions
    
    - [x] dev
    - [ ] 3.0
    - [ ] 2.1
    - [ ] 2.0
    
    ## Languages
    
    - [x] Chinese
    - [x] English
    
    ## Docs Checklist
    
    - [ ] Checked by AI
    - [ ] Test Cases Built
---
 .../basic-element/sql-data-types/conversion/time-conversion.md   | 5 +++--
 .../basic-element/sql-data-types/conversion/time-conversion.md   | 9 +++++----
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git 
a/docs/sql-manual/basic-element/sql-data-types/conversion/time-conversion.md 
b/docs/sql-manual/basic-element/sql-data-types/conversion/time-conversion.md
index 986ef1f97b6..bb26df8f126 100644
--- a/docs/sql-manual/basic-element/sql-data-types/conversion/time-conversion.md
+++ b/docs/sql-manual/basic-element/sql-data-types/conversion/time-conversion.md
@@ -89,12 +89,12 @@ Two formats are supported: `<colon-format>` and 
`<numeric-format>`.
 Starting from 4.0, DECIMAL type is converted according to its literal value 
representation. Supports parsing `<microsecond>` field to microseconds. Any 
format exceeding the boundary is considered an error and handled accordingly.
 :::
 
-Except for error handling, non-strict mode behavior is identical to strict 
mode.
+Non-strict mode supports leading and trailing spaces, and error handling is 
different from strict mode.
 
 #### BNF Definition
 
 ```xml
-<time> ::= ("+" | "-")? (<colon-format> | <numeric-format>)
+<time> ::= <whitespace>* ("+" | "-")? (<colon-format> | <numeric-format>) 
<whitespace>*
 
 <colon-format> ::= <hour> ":" <minute> (":" <second> (<microsecond>)?)?
 <hour> ::= <digit>+
@@ -106,6 +106,7 @@ Except for error handling, non-strict mode behavior is 
identical to strict mode.
 <microsecond> ::= "." <digit>*
 
 <digit> ::= "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"
+<whitespace> ::= " " | "\t" | "\n" | "\r" | "\v" | "\f"
 ```
 
 #### Rule Description
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/basic-element/sql-data-types/conversion/time-conversion.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/basic-element/sql-data-types/conversion/time-conversion.md
index 40d39b80ce7..9332c678a4a 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/basic-element/sql-data-types/conversion/time-conversion.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/basic-element/sql-data-types/conversion/time-conversion.md
@@ -94,15 +94,15 @@ TIME 类型包含类型参数 `p`,即小数位数。完整表示为 `TIME(p)`
 ### 非严格模式
 
 :::caution 行为变更
-自 4.0 开始,DECIMAL 类型按照其字面数值表示进行转换。支持解析 \<microsecond> 
域到微秒。任意格式越界以后均认为是错误,执行错误处理。
+自 4.0 开始,支持解析 \<microsecond> 域到微秒。任意格式越界以后均认为是错误,执行错误处理。
 :::
 
-除错误处理外,非严格模式的行为同严格模式完全一致。
+非严格模式支持前后空格,且错误处理与严格模式不同。
 
 #### BNF 定义
 
 ```xml
-<time> ::= ("+" | "-")? (<colon-format> | <numeric-format>)
+<time> ::= <whitespace>* ("+" | "-")? (<colon-format> | <numeric-format>) 
<whitespace>*
 
 <colon-format> ::= <hour> ":" <minute> (":" <second> (<microsecond>)?)?
 <hour> ::= <digit>+
@@ -114,6 +114,7 @@ TIME 类型包含类型参数 `p`,即小数位数。完整表示为 `TIME(p)`
 <microsecond> ::= "." <digit>*
 
 <digit> ::= "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"
+<whitespace> ::= " " | "\t" | "\n" | "\r" | "\v" | "\f"
 ```
 
 #### 规则描述
@@ -178,7 +179,7 @@ TIME 类型包含类型参数 `p`,即小数位数。完整表示为 `TIME(p)`
 支持所有数字类型转换为 TIME 类型。
 
 :::caution 行为变更
-自 4.0 开始,Doris 支持解析小数部分,且支持任意数字类型转换到 Time 类型。
+自 4.0 开始,Doris 支持解析小数部分,且支持任意数字类型转换到 Time 类型。DECIMAL 类型按照其字面数值表示进行转换。
 :::
 
 ### 严格模式


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

Reply via email to