This is an automated email from the ASF dual-hosted git repository.
yiguolei 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 b41f3132149 [docs](load) update strict mode description and examples
(#3545)
b41f3132149 is described below
commit b41f31321492498ff6f8ca1dfd3b6b2929d1b2e0
Author: TengJianPing <[email protected]>
AuthorDate: Wed Apr 15 09:32:42 2026 +0800
[docs](load) update strict mode description and examples (#3545)
## Versions
- [x] dev
- [x] 4.x
- [ ] 3.x
- [ ] 2.1
## Languages
- [x] Chinese
- [x] English
## Docs Checklist
- [ ] Checked by AI
- [ ] Test Cases Built
---
docs/data-operate/import/handling-messy-data.md | 22 ++++++++++++++++++----
.../data-operate/import/handling-messy-data.md | 21 +++++++++++++++++----
.../data-operate/import/handling-messy-data.md | 21 +++++++++++++++++----
.../data-operate/import/handling-messy-data.md | 22 ++++++++++++++++++----
4 files changed, 70 insertions(+), 16 deletions(-)
diff --git a/docs/data-operate/import/handling-messy-data.md
b/docs/data-operate/import/handling-messy-data.md
index 67156f91ac6..8da6f745870 100644
--- a/docs/data-operate/import/handling-messy-data.md
+++ b/docs/data-operate/import/handling-messy-data.md
@@ -35,7 +35,7 @@ The system employs different strategies based on the strict
mode setting:
| ----------------- | -------------------- | ----------------------------- |
----------- | ------ |
| NULL | \N | NULL |
ON/OFF | NULL |
| Non-NULL | "abc" or 2000 | NULL | ON
| Invalid (Filtered) |
-| Non-NULL | "abc" | NULL |
OFF | NULL |
+| Non-NULL | "abc" or 2000 | NULL |
OFF | NULL |
| Non-NULL | 1 | 1 |
ON/OFF | Loaded Successfully |
:::tip
@@ -51,14 +51,28 @@ The system employs different strategies based on the strict
mode setting:
| NULL | \N | NULL |
ON/OFF | NULL |
| Non-NULL | aaa | NULL | ON
| Invalid (Filtered) |
| Non-NULL | aaa | NULL | OFF
| NULL |
-| Non-NULL | 1 or 10 | 1 or 10 |
ON/OFF | Loaded Successfully |
+| Non-NULL | 10 | NULL (overflow) | ON
| Filtered |
+| Non-NULL | 10 | NULL (overflow) | OFF
| NULL |
:::tip
1. The column in the table allows NULL values
2. `abc` becomes NULL after conversion to Decimal due to type issues. When
strict mode is ON, such data will be filtered out. When OFF, NULL will be
loaded.
-3. Although `10` exceeds the range, since its type meets decimal requirements,
strict mode does not affect it.
+3. `10` is a value outside the range of Decimal(1, 0) and will be converted to
NULL. It will be filtered out if strict mode is enabled. If strict mode is
disabled, `null` will be imported.
+:::
+
+**3. Example of a column type char(10)**
+
+| Original data type | Original Data Example | Value after conversion to
char(10) | Strict mode | Result |
+| ------------------ | --------------------- |
---------------------------------- | ---------- | ------ |
+| NULL | \N | NULL
| ON/OFF | NULL |
+| Non-NULL | a1234567890 | a1234567890
| ON | Too long, filtered |
+| Non-NULL | a1234567890 | a1234567890
| OFF | a123456789 (truncated) |
+
+:::tip
+
+1. The column in the table allows NULL values
:::
### Enable Strict Mode
@@ -183,5 +197,5 @@ SET insert_max_filter_ratio = 0.1;
INSERT INTO test_table FROM S3/HDFS/LOCAL();```
:::tip
-For Insert Into statements, `insert_max_filter_ratio` only takes effect when
`enable_insert_strict = false`, and only applies to `INSERT INTO FROM
S3/HDFS/LOCAL()` syntax. The default value is 1.0, which means that all
abnormal data are allowed to be filtered.
+For Insert Into statements, `insert_max_filter_ratio` only takes effect when
`enable_insert_strict = false`. The default value is 1.0, which means that all
abnormal data are allowed to be filtered.
:::
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/data-operate/import/handling-messy-data.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/data-operate/import/handling-messy-data.md
index 35a47cdf52c..3e74d304a38 100644
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/data-operate/import/handling-messy-data.md
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/data-operate/import/handling-messy-data.md
@@ -33,7 +33,7 @@
| ------------ | ------------- | --------------------- | ---------- |
---------------- |
| 空值 | \N | NULL | 开启或关闭 | NULL
|
| 非空值 | "abc" or 2000 | NULL | 开启 | 非法值(被过滤) |
-| 非空值 | "abc" | NULL | 关闭 | NULL
|
+| 非空值 | "abc" or 2000 | NULL | 关闭 | NULL
|
| 非空值 | 1 | 1 | 开启或关闭 | 正确导入 |
:::tip
@@ -49,14 +49,27 @@
| 空值 | \N | null | 开启或关闭 | NULL
|
| 非空值 | aaa | NULL | 开启 | 非法值(被过滤) |
| 非空值 | aaa | NULL | 关闭 | NULL
|
-| 非空值 | 1 or 10 | 1 or 10 | 开启或关闭 | 正确导入 |
+| 非空值 | 10 | NULL(溢出) | 开启 | 被过滤 |
+| 非空值 | 10 | NULL(溢出) | 关闭 | NULL
|
:::tip
1. 表中的列允许导入空值
2. `abc` 在转换为 Decimal 后,会因类型问题变为 NULL。在严格模式开启的情况下,这类数据将会被过滤。而如果是关闭状态,则会导入
`null`。
-3. `10` 虽然是一个超过范围的值,但是因为其类型符合 decimal 的要求,所以严格模式对其不产生影响。
+3. `10` 是一个超过Decimal(1, 0)范围的值,会被转换为NULL,在严格模式开启的情况下将会被过滤。严格模式关闭状态下,则会导入
`null`。
+:::
+
+**3. 以列类型为 char(10) 举例**
+
+| 原始数据类型 | 原始数据举例 | 转换为 char(10) 后的值 | 严格模式 | 结果 |
+| ------------ | ------------ | --------------------- | ---------- |
---------------- |
+| 空值 | \N | null | 开启或关闭 | NULL
|
+| 非空值 | a1234567890 | a1234567890 | 开启 | 超长,被过滤 |
+| 非空值 | a1234567890 | a1234567890 | 关闭 | a123456789
(截断) |
+
+:::tip
+1. 表中的列允许导入空值
:::
### 开启严格模式
@@ -182,5 +195,5 @@ INSERT INTO test_table FROM S3/HDFS/LOCAL();
```
:::tip
-对于 Insert Into 语句,`insert_max_filter_ratio` 仅在 `enable_insert_strict = false`
时生效,且只适用于 `INSERT INTO FROM S3/HDFS/LOCAL()` 语法。默认值为 1.0,表示允许所有异常数据被过滤。
+对于 Insert Into 语句,`insert_max_filter_ratio` 仅在 `enable_insert_strict = false`
时生效。默认值为 1.0,表示允许所有异常数据被过滤。
:::
\ No newline at end of file
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/data-operate/import/handling-messy-data.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/data-operate/import/handling-messy-data.md
index 35a47cdf52c..3e74d304a38 100644
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/data-operate/import/handling-messy-data.md
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/data-operate/import/handling-messy-data.md
@@ -33,7 +33,7 @@
| ------------ | ------------- | --------------------- | ---------- |
---------------- |
| 空值 | \N | NULL | 开启或关闭 | NULL
|
| 非空值 | "abc" or 2000 | NULL | 开启 | 非法值(被过滤) |
-| 非空值 | "abc" | NULL | 关闭 | NULL
|
+| 非空值 | "abc" or 2000 | NULL | 关闭 | NULL
|
| 非空值 | 1 | 1 | 开启或关闭 | 正确导入 |
:::tip
@@ -49,14 +49,27 @@
| 空值 | \N | null | 开启或关闭 | NULL
|
| 非空值 | aaa | NULL | 开启 | 非法值(被过滤) |
| 非空值 | aaa | NULL | 关闭 | NULL
|
-| 非空值 | 1 or 10 | 1 or 10 | 开启或关闭 | 正确导入 |
+| 非空值 | 10 | NULL(溢出) | 开启 | 被过滤 |
+| 非空值 | 10 | NULL(溢出) | 关闭 | NULL
|
:::tip
1. 表中的列允许导入空值
2. `abc` 在转换为 Decimal 后,会因类型问题变为 NULL。在严格模式开启的情况下,这类数据将会被过滤。而如果是关闭状态,则会导入
`null`。
-3. `10` 虽然是一个超过范围的值,但是因为其类型符合 decimal 的要求,所以严格模式对其不产生影响。
+3. `10` 是一个超过Decimal(1, 0)范围的值,会被转换为NULL,在严格模式开启的情况下将会被过滤。严格模式关闭状态下,则会导入
`null`。
+:::
+
+**3. 以列类型为 char(10) 举例**
+
+| 原始数据类型 | 原始数据举例 | 转换为 char(10) 后的值 | 严格模式 | 结果 |
+| ------------ | ------------ | --------------------- | ---------- |
---------------- |
+| 空值 | \N | null | 开启或关闭 | NULL
|
+| 非空值 | a1234567890 | a1234567890 | 开启 | 超长,被过滤 |
+| 非空值 | a1234567890 | a1234567890 | 关闭 | a123456789
(截断) |
+
+:::tip
+1. 表中的列允许导入空值
:::
### 开启严格模式
@@ -182,5 +195,5 @@ INSERT INTO test_table FROM S3/HDFS/LOCAL();
```
:::tip
-对于 Insert Into 语句,`insert_max_filter_ratio` 仅在 `enable_insert_strict = false`
时生效,且只适用于 `INSERT INTO FROM S3/HDFS/LOCAL()` 语法。默认值为 1.0,表示允许所有异常数据被过滤。
+对于 Insert Into 语句,`insert_max_filter_ratio` 仅在 `enable_insert_strict = false`
时生效。默认值为 1.0,表示允许所有异常数据被过滤。
:::
\ No newline at end of file
diff --git
a/versioned_docs/version-4.x/data-operate/import/handling-messy-data.md
b/versioned_docs/version-4.x/data-operate/import/handling-messy-data.md
index 67156f91ac6..8da6f745870 100644
--- a/versioned_docs/version-4.x/data-operate/import/handling-messy-data.md
+++ b/versioned_docs/version-4.x/data-operate/import/handling-messy-data.md
@@ -35,7 +35,7 @@ The system employs different strategies based on the strict
mode setting:
| ----------------- | -------------------- | ----------------------------- |
----------- | ------ |
| NULL | \N | NULL |
ON/OFF | NULL |
| Non-NULL | "abc" or 2000 | NULL | ON
| Invalid (Filtered) |
-| Non-NULL | "abc" | NULL |
OFF | NULL |
+| Non-NULL | "abc" or 2000 | NULL |
OFF | NULL |
| Non-NULL | 1 | 1 |
ON/OFF | Loaded Successfully |
:::tip
@@ -51,14 +51,28 @@ The system employs different strategies based on the strict
mode setting:
| NULL | \N | NULL |
ON/OFF | NULL |
| Non-NULL | aaa | NULL | ON
| Invalid (Filtered) |
| Non-NULL | aaa | NULL | OFF
| NULL |
-| Non-NULL | 1 or 10 | 1 or 10 |
ON/OFF | Loaded Successfully |
+| Non-NULL | 10 | NULL (overflow) | ON
| Filtered |
+| Non-NULL | 10 | NULL (overflow) | OFF
| NULL |
:::tip
1. The column in the table allows NULL values
2. `abc` becomes NULL after conversion to Decimal due to type issues. When
strict mode is ON, such data will be filtered out. When OFF, NULL will be
loaded.
-3. Although `10` exceeds the range, since its type meets decimal requirements,
strict mode does not affect it.
+3. `10` is a value outside the range of Decimal(1, 0) and will be converted to
NULL. It will be filtered out if strict mode is enabled. If strict mode is
disabled, `null` will be imported.
+:::
+
+**3. Example of a column type char(10)**
+
+| Original data type | Original Data Example | Value after conversion to
char(10) | Strict mode | Result |
+| ------------------ | --------------------- |
---------------------------------- | ---------- | ------ |
+| NULL | \N | NULL
| ON/OFF | NULL |
+| Non-NULL | a1234567890 | a1234567890
| ON | Too long, filtered |
+| Non-NULL | a1234567890 | a1234567890
| OFF | a123456789 (truncated) |
+
+:::tip
+
+1. The column in the table allows NULL values
:::
### Enable Strict Mode
@@ -183,5 +197,5 @@ SET insert_max_filter_ratio = 0.1;
INSERT INTO test_table FROM S3/HDFS/LOCAL();```
:::tip
-For Insert Into statements, `insert_max_filter_ratio` only takes effect when
`enable_insert_strict = false`, and only applies to `INSERT INTO FROM
S3/HDFS/LOCAL()` syntax. The default value is 1.0, which means that all
abnormal data are allowed to be filtered.
+For Insert Into statements, `insert_max_filter_ratio` only takes effect when
`enable_insert_strict = false`. The default value is 1.0, which means that all
abnormal data are allowed to be filtered.
:::
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]