This is an automated email from the ASF dual-hosted git repository.
jacktengg 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 565ff39c24d [regression](load) add some p0 case for load strict mode
(#62478)
565ff39c24d is described below
commit 565ff39c24dab318cf587dfa7247ee9b22e18f54
Author: TengJianPing <[email protected]>
AuthorDate: Thu Apr 16 10:01:45 2026 +0800
[regression](load) add some p0 case for load strict mode (#62478)
---
.../test_insert_strict_mode_and_filter_ratio.out | 116 +++++++
...st_stream_load_strict_mode_and_filter_ratio.out | 23 ++
.../load_p0/stream_load/test_tinyint_overflow.csv | 10 +
...test_insert_strict_mode_and_filter_ratio.groovy | 354 ++++++++++++++++++++-
...stream_load_strict_mode_and_filter_ratio.groovy | 103 +++++-
.../test_tvf_strict_mode_and_filter_ratio.groovy | 20 +-
6 files changed, 603 insertions(+), 23 deletions(-)
diff --git
a/regression-test/data/load_p0/insert/test_insert_strict_mode_and_filter_ratio.out
b/regression-test/data/load_p0/insert/test_insert_strict_mode_and_filter_ratio.out
index 7872fa4bef8..bc3efbb3f6b 100644
---
a/regression-test/data/load_p0/insert/test_insert_strict_mode_and_filter_ratio.out
+++
b/regression-test/data/load_p0/insert/test_insert_strict_mode_and_filter_ratio.out
@@ -90,3 +90,119 @@
-- !sql_mb_string_exceed_len_strict0 --
+-- !insert_select_string_exceed_len_non_strict0_src --
+1 a1
+20 a20
+30 a30
+59 a59
+60 a60
+70 a70
+79 a79
+81 a1234567890
+91 a9234567890
+100 a10234567890
+
+-- !insert_select_string_exceed_len_non_strict0_dst --
+1 a1
+20 a20
+30 a30
+59 a59
+60 a60
+70 a70
+79 a79
+81 a123456789
+91 a923456789
+100 a102345678
+
+-- !insert_select_string_exceed_len_strict1_dst --
+
+-- !insert_select_number_overflow_non_strict_src --
+1234567890
+1234567891
+1234567892
+1234567893
+1234567894
+1234567895
+1234567896
+12345678902
+12345678903
+12345678971
+
+-- !insert_select_number_overflow_non_strict_dst --
+\N
+\N
+\N
+1234567890
+1234567891
+1234567892
+1234567893
+1234567894
+1234567895
+1234567896
+
+-- !insert_select_number_overflow_strict0_dst --
+
+-- !insert_select_non_number_to_number_non_strict_dst --
+\N
+\N
+\N
+1234567890
+1234567890
+1234567893
+1234567894
+1234567895
+1234567896
+1234567897
+
+-- !insert_select_non_number_to_number_strict_dst --
+
+-- !insert_select_null_into_not_null_non_strict_src --
+\N
+\N
+\N
+1234567890
+1234567891
+1234567892
+1234567893
+1234567894
+1234567895
+1234567896
+
+-- !insert_select_null_into_not_null_non_strict_dst0 --
+
+-- !insert_select_null_into_not_null_non_strict_dst1 --
+1234567890
+1234567891
+1234567892
+1234567893
+1234567894
+1234567895
+1234567896
+
+-- !insert_select_null_into_not_null_strict_dst0 --
+
+-- !insert_select_no_partition_src --
+1 a1
+20 a20
+30 a30
+59 a59
+60 a60
+70 a70
+79 a79
+81 a81
+91 a91
+100 a100
+
+-- !insert_select_no_partition_non_strict_dst0 --
+
+-- !insert_select_no_partition_non_strict_dst1 --
+1 a1
+20 a20
+30 a30
+59 a59
+60 a60
+70 a70
+79 a79
+
+-- !insert_select_no_partition_strict_dst0 --
+
diff --git
a/regression-test/data/load_p0/stream_load/test_stream_load_strict_mode_and_filter_ratio.out
b/regression-test/data/load_p0/stream_load/test_stream_load_strict_mode_and_filter_ratio.out
index 55ac0281d95..13f0cc3e95d 100644
---
a/regression-test/data/load_p0/stream_load/test_stream_load_strict_mode_and_filter_ratio.out
+++
b/regression-test/data/load_p0/stream_load/test_stream_load_strict_mode_and_filter_ratio.out
@@ -1,4 +1,27 @@
-- This file is automatically generated. You should know what you did if you
want to edit this
+-- !sql_int_overflow_non_strict --
+\N
+\N
+\N
+1
+2
+3
+4
+5
+6
+7
+
+-- !sql_tinyint_overflow_strict0 --
+1
+2
+3
+4
+5
+6
+7
+
+-- !sql_tinyint_overflow_strict1 --
+
-- !sql_number_overflow_non_strict --
\N
\N
diff --git a/regression-test/data/load_p0/stream_load/test_tinyint_overflow.csv
b/regression-test/data/load_p0/stream_load/test_tinyint_overflow.csv
new file mode 100644
index 00000000000..6d70bc854d7
--- /dev/null
+++ b/regression-test/data/load_p0/stream_load/test_tinyint_overflow.csv
@@ -0,0 +1,10 @@
+1
+2
+3
+4
+5
+6
+7
+128
+129
+-129
\ No newline at end of file
diff --git
a/regression-test/suites/load_p0/insert/test_insert_strict_mode_and_filter_ratio.groovy
b/regression-test/suites/load_p0/insert/test_insert_strict_mode_and_filter_ratio.groovy
index 5fc9a00d086..7c697d30527 100644
---
a/regression-test/suites/load_p0/insert/test_insert_strict_mode_and_filter_ratio.groovy
+++
b/regression-test/suites/load_p0/insert/test_insert_strict_mode_and_filter_ratio.groovy
@@ -151,8 +151,12 @@ suite("test_insert_strict_mode_and_filter_ratio","p0") {
(1234567890),
(1234567890);
"""
- exception """Insert has too many filtered data"""
- exception """url"""
+ // when running case in cloud mode, the error message is truncated
because it exceeds
+ // the 512 bytes limit, the truncated error message is like:
+ // 'java.sql.SQLException: errCode = 2, detailMessag. first_error_msg:
column_name[k00], null value for not null column, type=Decimal(10, 0). Src
line: . url:
http://doris-community-test.oss-cn-hongkong.aliyuncs.com/cloud_regression/error_log/a729a6faa92e3094?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=*******%2F20260415%2Foss-cn-hongkong%2Fs3%2Faws4_request&X-Amz-Date=20260415T041754Z&X-Amz-Expires=604799&X-Amz-SignedHeaders=host&X-Amz-Signature=ea12209f954ba8e2fa8fff45105
[...]
+ // There is no text 'Insert has too many filtered data'.
+ // exception """Insert has too many filtered data"""
+ exception """null value for not null column"""
}
qt_sql_not_null_to_null_non_strict0 "select * from
test_insert_strict_mode_and_filter_ratio order by 1"
@@ -173,8 +177,8 @@ suite("test_insert_strict_mode_and_filter_ratio","p0") {
(1234567890),
(1234567890);
"""
- exception """Insert has too many filtered data"""
- exception """url"""
+ // exception """Insert has too many filtered data"""
+ exception """null value for not null column"""
}
qt_sql_not_null_to_null_non_strict1 "select * from
test_insert_strict_mode_and_filter_ratio order by 1"
@@ -260,8 +264,8 @@ suite("test_insert_strict_mode_and_filter_ratio","p0") {
(1234567890),
(1234567890);
"""
- exception """Encountered unqualified data, stop processing"""
- exception """url"""
+ // exception """Insert has filtered data in strict mode"""
+ exception """null value for not null column"""
}
// 4. no partition
@@ -299,8 +303,8 @@ suite("test_insert_strict_mode_and_filter_ratio","p0") {
(91, "a91"),
(100, "a100");
"""
- exception """Insert has too many filtered data"""
- exception """url"""
+ // exception """Insert has too many filtered data"""
+ exception """no partition"""
}
qt_sql_no_partition_non_strict0 "select * from
test_insert_strict_mode_and_filter_ratio order by 1"
@@ -347,8 +351,8 @@ suite("test_insert_strict_mode_and_filter_ratio","p0") {
(91, "a91"),
(100, "a100");
"""
- exception """Encountered unqualified data, stop processing"""
- exception """url"""
+ // exception """Insert has filtered data in strict mode"""
+ exception """no partition"""
}
qt_sql_no_partition_strict0 "select * from
test_insert_strict_mode_and_filter_ratio order by 1"
@@ -402,8 +406,8 @@ suite("test_insert_strict_mode_and_filter_ratio","p0") {
(91, "a9234567890"),
(100, "a10234567890");
"""
- exception """Encountered unqualified data, stop processing"""
- exception """url"""
+ // exception """Insert has filtered data in strict mode"""
+ exception """the length of input is too long"""
}
qt_sql_string_exceed_len_strict1 "select * from
test_insert_strict_mode_and_filter_ratio order by 1"
@@ -436,7 +440,7 @@ suite("test_insert_strict_mode_and_filter_ratio","p0") {
(9, "中z"),
(10, "国g");
"""
- exception """Insert has too many filtered data"""
+ exception """the length of input is too long"""
}
qt_sql_mb_string_exceed_len_non_strict0 "select * from
test_insert_strict_mode_and_filter_ratio order by 1"
@@ -484,4 +488,326 @@ suite("test_insert_strict_mode_and_filter_ratio","p0") {
exception """Insert has filtered data in strict mode"""
}
qt_sql_mb_string_exceed_len_strict0 "select * from
test_insert_strict_mode_and_filter_ratio order by 1"
-}
\ No newline at end of file
+
+ // 7. insert into select, string exceed schema length
+ // 7.1 insert into select, string exceed schema length,
enable_insert_strict=false, insert_max_filter_ratio=0, load success
+ sql """
+ drop table if exists
test_insert_select_strict_mode_and_filter_ratio_src;
+ """
+ sql """
+ create table test_insert_select_strict_mode_and_filter_ratio_src(
+ id int,
+ name char(64)
+ ) properties ('replication_num' = '1');
+ """
+ sql "set enable_insert_strict=false"
+ sql "set enable_strict_cast=true"
+ sql "set insert_max_filter_ratio=0"
+ sql """
+ insert into test_insert_select_strict_mode_and_filter_ratio_src values
+ (1, "a1"),
+ (20, "a20"),
+ (30, "a30"),
+ (59, "a59"),
+ (60, "a60"),
+ (70, "a70"),
+ (79, "a79"),
+ (81, "a1234567890"),
+ (91, "a9234567890"),
+ (100, "a10234567890");
+ """
+ qt_insert_select_string_exceed_len_non_strict0_src "select * from
test_insert_select_strict_mode_and_filter_ratio_src order by 1"
+ sql """
+ drop table if exists
test_insert_select_strict_mode_and_filter_ratio_dst;
+ """
+ sql """
+ create table test_insert_select_strict_mode_and_filter_ratio_dst(
+ id int,
+ name char(10)
+ ) properties ('replication_num' = '1');
+ """
+ sql """
+ insert into test_insert_select_strict_mode_and_filter_ratio_dst select *
from test_insert_select_strict_mode_and_filter_ratio_src;
+ """
+ qt_insert_select_string_exceed_len_non_strict0_dst "select * from
test_insert_select_strict_mode_and_filter_ratio_dst order by 1"
+
+ // 7.2 string exceed schema length, enable_insert_strict=true,
insert_max_filter_ratio=1, load fail
+ sql """
+ truncate table test_insert_select_strict_mode_and_filter_ratio_dst;
+ """
+ sql "set enable_insert_strict=true"
+ sql "set enable_strict_cast=false"
+ sql "set insert_max_filter_ratio=1"
+ test {
+ sql """
+ insert into test_insert_select_strict_mode_and_filter_ratio_dst select
* from test_insert_select_strict_mode_and_filter_ratio_src;
+ """
+ // exception """Insert has filtered data in strict mode"""
+ exception """the length of input is too long"""
+ }
+ qt_insert_select_string_exceed_len_strict1_dst "select * from
test_insert_select_strict_mode_and_filter_ratio_dst order by 1"
+
+ // 8. insert into select, number overflow
+ // 8.1 number overflow, enable_insert_strict=false,
insert_max_filter_ratio=0, success
+ sql """ DROP TABLE IF EXISTS
test_insert_select_strict_mode_and_filter_ratio_src """
+ sql """
+ CREATE TABLE test_insert_select_strict_mode_and_filter_ratio_src
+ (
+ k00 DECIMALV3(38,0)
+ )
+ PROPERTIES ("replication_num" = "1");
+ """
+ sql "set enable_insert_strict=false"
+ sql "set enable_strict_cast=true"
+ sql "set insert_max_filter_ratio=0"
+ sql """
+ INSERT INTO test_insert_select_strict_mode_and_filter_ratio_src VALUES
+ (1234567890),
+ (1234567891),
+ (1234567892),
+ (1234567893),
+ (1234567894),
+ (1234567895),
+ (1234567896),
+ (12345678971),
+ (12345678902),
+ (12345678903);
+ """
+ qt_insert_select_number_overflow_non_strict_src "select * from
test_insert_select_strict_mode_and_filter_ratio_src order by 1"
+
+ sql """ DROP TABLE IF EXISTS
test_insert_select_strict_mode_and_filter_ratio_dst """
+ sql """
+ CREATE TABLE test_insert_select_strict_mode_and_filter_ratio_dst
+ (
+ k00 DECIMALV3(10,0)
+ )
+ PROPERTIES ("replication_num" = "1");
+ """
+ sql """
+ insert into test_insert_select_strict_mode_and_filter_ratio_dst select *
from test_insert_select_strict_mode_and_filter_ratio_src;
+ """
+ qt_insert_select_number_overflow_non_strict_dst "select * from
test_insert_select_strict_mode_and_filter_ratio_dst order by 1"
+
+ // 8.2 number overflow, enable_insert_strict=true,
insert_max_filter_ratio=1, fail
+ sql """
+ truncate table test_insert_select_strict_mode_and_filter_ratio_dst;
+ """
+ sql "set enable_insert_strict=true"
+ sql "set enable_strict_cast=false"
+ sql "set insert_max_filter_ratio=1"
+ test {
+ sql """
+ insert into test_insert_select_strict_mode_and_filter_ratio_dst select
* from test_insert_select_strict_mode_and_filter_ratio_src;
+ """
+ exception """Arithmetic overflow"""
+ }
+ qt_insert_select_number_overflow_strict0_dst "select * from
test_insert_select_strict_mode_and_filter_ratio_dst order by 1"
+
+ // 9. insert into select, not number to number
+ // 9.1 not number to number, enable_insert_strict=false,
insert_max_filter_ratio=0, success
+ sql """ DROP TABLE IF EXISTS
test_insert_select_strict_mode_and_filter_ratio_src """
+ sql """
+ CREATE TABLE test_insert_select_strict_mode_and_filter_ratio_src
+ (
+ k00 char(64)
+ )
+ PROPERTIES ("replication_num" = "1");
+ """
+ sql "set enable_insert_strict=false"
+ sql "set enable_strict_cast=true"
+ sql "set insert_max_filter_ratio=0"
+ sql """
+ INSERT INTO test_insert_select_strict_mode_and_filter_ratio_src VALUES
+ ("1234567abc"),
+ ("abc4567891"),
+ ("1234567xxx"),
+ (1234567893),
+ (1234567894),
+ (1234567895),
+ (1234567896),
+ (1234567897),
+ (1234567890),
+ (1234567890);
+ """
+ sql """
+ truncate table test_insert_select_strict_mode_and_filter_ratio_dst;
+ """
+ sql """
+ insert into test_insert_select_strict_mode_and_filter_ratio_dst select *
from test_insert_select_strict_mode_and_filter_ratio_src;
+ """
+ qt_insert_select_non_number_to_number_non_strict_dst "select * from
test_insert_select_strict_mode_and_filter_ratio_dst order by 1"
+
+ // 9.2 not number to number, enable_insert_strict=true,
insert_max_filter_ratio=1, fail
+ sql "set enable_insert_strict=true"
+ sql "set enable_strict_cast=false"
+ sql "set insert_max_filter_ratio=1"
+ sql """
+ truncate table test_insert_select_strict_mode_and_filter_ratio_dst;
+ """
+ test {
+ sql """
+ insert into test_insert_select_strict_mode_and_filter_ratio_dst select
* from test_insert_select_strict_mode_and_filter_ratio_src;
+ """
+ exception """INVALID_ARGUMENT"""
+ }
+ qt_insert_select_non_number_to_number_strict_dst "select * from
test_insert_select_strict_mode_and_filter_ratio_dst order by 1"
+
+ // 10. insert into select, null value to not null column
+ // 10.1 null value to not null column, enable_insert_strict=false,
insert_max_filter_ratio=0.2, fail
+ sql """ DROP TABLE IF EXISTS
test_insert_select_strict_mode_and_filter_ratio_src """
+ sql """
+ CREATE TABLE test_insert_select_strict_mode_and_filter_ratio_src
+ (
+ k00 DECIMALV3(10,0)
+ )
+ PROPERTIES ("replication_num" = "1");
+ """
+ sql "set enable_insert_strict=false"
+ sql "set enable_strict_cast=true"
+ sql "set insert_max_filter_ratio=0.2"
+ sql """
+ INSERT INTO test_insert_select_strict_mode_and_filter_ratio_src VALUES
+ (1234567890),
+ (1234567891),
+ (1234567892),
+ (1234567893),
+ (1234567894),
+ (1234567895),
+ (1234567896),
+ (12345678971),
+ (12345678902),
+ (12345678903);
+ """
+ qt_insert_select_null_into_not_null_non_strict_src "select * from
test_insert_select_strict_mode_and_filter_ratio_src order by 1"
+
+ sql """
+ DROP TABLE IF EXISTS
test_insert_select_strict_mode_and_filter_ratio_dst;
+ """
+ sql """
+ CREATE TABLE test_insert_select_strict_mode_and_filter_ratio_dst
+ (
+ k00 DECIMALV3(10,0) NOT NULL
+ )
+ PROPERTIES ("replication_num" = "1");
+ """
+ test {
+ sql """
+ insert into test_insert_select_strict_mode_and_filter_ratio_dst select
* from test_insert_select_strict_mode_and_filter_ratio_src;
+ """
+ // exception """Insert has too many filtered data"""
+ exception """null value for not null column"""
+ }
+ qt_insert_select_null_into_not_null_non_strict_dst0 "select * from
test_insert_select_strict_mode_and_filter_ratio_dst order by 1"
+
+ // 10.2 null value to not null column, enable_insert_strict=false,
insert_max_filter_ratio=0.3, success
+ sql """
+ truncate TABLE test_insert_select_strict_mode_and_filter_ratio_dst;
+ """
+ sql "set enable_insert_strict=false"
+ sql "set enable_strict_cast=true"
+ sql "set insert_max_filter_ratio=0.3"
+ sql """
+ insert into test_insert_select_strict_mode_and_filter_ratio_dst select
* from test_insert_select_strict_mode_and_filter_ratio_src;
+ """
+ qt_insert_select_null_into_not_null_non_strict_dst1 "select * from
test_insert_select_strict_mode_and_filter_ratio_dst order by 1"
+
+ // 10.3 null value to not null column, enable_insert_strict=true,
insert_max_filter_ratio=1, fail
+ sql """
+ truncate TABLE test_insert_select_strict_mode_and_filter_ratio_dst;
+ """
+ sql "set enable_insert_strict=true"
+ sql "set enable_strict_cast=false"
+ sql "set insert_max_filter_ratio=1"
+ test {
+ sql """
+ insert into test_insert_select_strict_mode_and_filter_ratio_dst select
* from test_insert_select_strict_mode_and_filter_ratio_src;
+ """
+ // exception """Insert has filtered data in strict mode"""
+ exception """null value for not null column"""
+ }
+ qt_insert_select_null_into_not_null_strict_dst0 "select * from
test_insert_select_strict_mode_and_filter_ratio_dst order by 1"
+
+ // 11. insert select, no partition
+ // 11.1 no partition, enable_insert_strict=false,
insert_max_filter_ratio=0.2, load fail
+ sql """
+ drop table if exists
test_insert_select_strict_mode_and_filter_ratio_src;
+ """
+ sql """
+ create table test_insert_select_strict_mode_and_filter_ratio_src (
+ id int,
+ name string
+ )
+ properties (
+ 'replication_num' = '1'
+ );
+ """
+ sql "set enable_insert_strict=false"
+ sql "set enable_strict_cast=true"
+ sql "set insert_max_filter_ratio=0.2"
+ sql """
+ insert into test_insert_select_strict_mode_and_filter_ratio_src values
+ (1, "a1"),
+ (20, "a20"),
+ (30, "a30"),
+ (59, "a59"),
+ (60, "a60"),
+ (70, "a70"),
+ (79, "a79"),
+ (81, "a81"),
+ (91, "a91"),
+ (100, "a100");
+ """
+ qt_insert_select_no_partition_src "select * from
test_insert_select_strict_mode_and_filter_ratio_src order by 1, 2"
+ sql """
+ drop table if exists
test_insert_select_strict_mode_and_filter_ratio_dst;
+ """
+ sql """
+ create table test_insert_select_strict_mode_and_filter_ratio_dst (
+ id int,
+ name string
+ ) PARTITION BY RANGE(`id`)
+ (
+ PARTITION `p0` VALUES LESS THAN ("60"),
+ PARTITION `p1` VALUES LESS THAN ("80")
+ )
+ properties (
+ 'replication_num' = '1'
+ );
+ """
+ test {
+ sql """
+ insert into test_insert_select_strict_mode_and_filter_ratio_dst
select * from test_insert_select_strict_mode_and_filter_ratio_src;
+ """
+ // exception """Insert has too many filtered data"""
+ exception """no partition"""
+ }
+ qt_insert_select_no_partition_non_strict_dst0 "select * from
test_insert_select_strict_mode_and_filter_ratio_dst order by 1, 2"
+
+ // 11.2 no partition, enable_insert_strict=false,
insert_max_filter_ratio=0.3, load success
+ sql """
+ truncate table test_insert_select_strict_mode_and_filter_ratio_dst;
+ """
+ sql "set enable_insert_strict=false"
+ sql "set enable_strict_cast=true"
+ sql "set insert_max_filter_ratio=0.3"
+ sql """
+ insert into test_insert_select_strict_mode_and_filter_ratio_dst select
* from test_insert_select_strict_mode_and_filter_ratio_src;
+ """
+ qt_insert_select_no_partition_non_strict_dst1 "select * from
test_insert_select_strict_mode_and_filter_ratio_dst order by 1, 2"
+
+ // 11.3 no partition, enable_insert_strict=true,
insert_max_filter_ratio=1, load fail
+ sql """
+ truncate table test_insert_select_strict_mode_and_filter_ratio_dst;
+ """
+ sql "set enable_insert_strict=true"
+ sql "set enable_strict_cast=false"
+ sql "set insert_max_filter_ratio=1"
+ test {
+ sql """
+ insert into test_insert_select_strict_mode_and_filter_ratio_dst
select * from test_insert_select_strict_mode_and_filter_ratio_src;
+ """
+ // exception """Insert has filtered data in strict mode"""
+ exception """no partition"""
+ }
+ qt_insert_select_no_partition_strict_dst0 "select * from
test_insert_select_strict_mode_and_filter_ratio_dst order by 1, 2"
+}
diff --git
a/regression-test/suites/load_p0/stream_load/test_stream_load_strict_mode_and_filter_ratio.groovy
b/regression-test/suites/load_p0/stream_load/test_stream_load_strict_mode_and_filter_ratio.groovy
index 7e5ca5f1064..fde86b368ea 100644
---
a/regression-test/suites/load_p0/stream_load/test_stream_load_strict_mode_and_filter_ratio.groovy
+++
b/regression-test/suites/load_p0/stream_load/test_stream_load_strict_mode_and_filter_ratio.groovy
@@ -23,7 +23,108 @@ import java.text.SimpleDateFormat
suite("test_stream_load_strict_mode_and_filter_ratio", "p0") {
// 1. number overflow
- def csvFile = """test_decimal_overflow.csv"""
+ def csvFile = """test_tinyint_overflow.csv"""
+
+
+ // 1.1 strict_mode=false, load success
+ sql """ DROP TABLE IF EXISTS test_stream_load_strict_mode_and_filter_ratio
"""
+ sql """
+ CREATE TABLE test_stream_load_strict_mode_and_filter_ratio
+ (
+ k00 tinyint
+ )
+ PROPERTIES ("replication_num" = "1");
+ """
+
+ streamLoad {
+ table "test_stream_load_strict_mode_and_filter_ratio"
+ file """${csvFile}"""
+ set 'column_separator', '|'
+ set 'strict_mode', 'false'
+ set 'max_filter_ratio', '0'
+
+ check { result, exception, startTime, endTime ->
+ if (exception != null) {
+ throw exception
+ }
+ def json = parseJson(result)
+ assertEquals("success", json.Status.toLowerCase())
+ assertEquals(10, json.NumberTotalRows)
+ assertEquals(10, json.NumberLoadedRows)
+ assertEquals(0, json.NumberFilteredRows)
+ // assertTrue(json.Message.contains("Encountered unqualified data,
stop processing. Please"))
+ }
+ }
+ qt_sql_int_overflow_non_strict "select * from
test_stream_load_strict_mode_and_filter_ratio order by 1"
+
+
+ // 1.2 strict_mode=true, max_filter_ratio=0.3, load success
+ sql """ DROP TABLE IF EXISTS test_stream_load_strict_mode_and_filter_ratio
"""
+ sql """
+ CREATE TABLE test_stream_load_strict_mode_and_filter_ratio
+ (
+ k00 tinyint
+ )
+ PROPERTIES ("replication_num" = "1");
+ """
+
+ streamLoad {
+ table "test_stream_load_strict_mode_and_filter_ratio"
+ file """${csvFile}"""
+ set 'column_separator', '|'
+ set 'strict_mode', 'true'
+ set 'max_filter_ratio', '0.3'
+
+ check { result, exception, startTime, endTime ->
+ if (exception != null) {
+ throw exception
+ }
+ def json = parseJson(result)
+ assertEquals("success", json.Status.toLowerCase())
+ assertEquals(10, json.NumberTotalRows)
+ assertEquals(7, json.NumberLoadedRows)
+ assertEquals(3, json.NumberFilteredRows)
+ assertTrue(result.contains("ErrorURL"))
+ }
+ }
+ qt_sql_tinyint_overflow_strict0 "select * from
test_stream_load_strict_mode_and_filter_ratio order by 1"
+
+
+
+ // 1.3 strict_mode=true, max_filter_ratio=0.2, load fail
+ sql """ DROP TABLE IF EXISTS test_stream_load_strict_mode_and_filter_ratio
"""
+ sql """
+ CREATE TABLE test_stream_load_strict_mode_and_filter_ratio
+ (
+ k00 tinyint
+ )
+ PROPERTIES ("replication_num" = "1");
+ """
+
+ streamLoad {
+ table "test_stream_load_strict_mode_and_filter_ratio"
+ file """${csvFile}"""
+ set 'column_separator', '|'
+ set 'strict_mode', 'true'
+ set 'max_filter_ratio', '0.2'
+
+ check { result, exception, startTime, endTime ->
+ if (exception != null) {
+ throw exception
+ }
+ def json = parseJson(result)
+ assertEquals("fail", json.Status.toLowerCase())
+ assertEquals(10, json.NumberTotalRows)
+ assertEquals(0, json.NumberLoadedRows)
+ assertEquals(3, json.NumberFilteredRows)
+ assertTrue(json.Message.contains("too many filtered rows"))
+ assertTrue(result.contains("ErrorURL"))
+ }
+ }
+ qt_sql_tinyint_overflow_strict1 "select * from
test_stream_load_strict_mode_and_filter_ratio order by 1"
+
+
+ csvFile = """test_decimal_overflow.csv"""
// 1.1 strict_mode=false, load success
sql """ DROP TABLE IF EXISTS test_stream_load_strict_mode_and_filter_ratio
"""
diff --git
a/regression-test/suites/load_p0/tvf/test_tvf_strict_mode_and_filter_ratio.groovy
b/regression-test/suites/load_p0/tvf/test_tvf_strict_mode_and_filter_ratio.groovy
index 3bb06993cb4..e22907daea0 100644
---
a/regression-test/suites/load_p0/tvf/test_tvf_strict_mode_and_filter_ratio.groovy
+++
b/regression-test/suites/load_p0/tvf/test_tvf_strict_mode_and_filter_ratio.groovy
@@ -141,8 +141,12 @@ suite("test_tvf_strict_mode_and_filter_ratio", "p0") {
"column_separator" = "|"
);
"""
- exception """Insert has too many filtered data"""
- exception """url"""
+ // when running case in cloud mode, the error message is truncated
because it exceeds
+ // the 512 bytes limit, the truncated error message is like:
+ // 'java.sql.SQLException: errCode = 2, detailMessag. first_error_msg:
column_name[k00], null value for not null column, type=Decimal(10, 0). Src
line: . url:
http://doris-community-test.oss-cn-hongkong.aliyuncs.com/cloud_regression/error_log/a729a6faa92e3094?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=*******%2F20260415%2Foss-cn-hongkong%2Fs3%2Faws4_request&X-Amz-Date=20260415T041754Z&X-Amz-Expires=604799&X-Amz-SignedHeaders=host&X-Amz-Signature=ea12209f954ba8e2fa8fff45105
[...]
+ // There is no text 'Insert has too many filtered data'.
+ // exception """Insert has too many filtered data"""
+ exception """null value for not null column"""
}
qt_sql_not_null_to_null_non_strict0 "select * from
test_insert_select_tvf_strict_mode_and_filter_ratio order by 1"
@@ -216,8 +220,8 @@ suite("test_tvf_strict_mode_and_filter_ratio", "p0") {
"column_separator" = "|"
);
"""
- exception """Insert has too many filtered data"""
- exception """url"""
+ // exception """Insert has too many filtered data"""
+ exception """no partition"""
}
qt_sql_no_partition_non_strict0 "select * from
test_insert_select_tvf_strict_mode_and_filter_ratio order by 1"
@@ -256,8 +260,8 @@ suite("test_tvf_strict_mode_and_filter_ratio", "p0") {
"column_separator" = "|"
);
"""
- exception """Encountered unqualified data, stop processing"""
- exception """url"""
+ // exception """Insert has filtered data in strict mode"""
+ exception """no partition"""
}
qt_sql_no_partition_strict0 "select * from
test_insert_select_tvf_strict_mode_and_filter_ratio order by 1"
@@ -305,8 +309,8 @@ suite("test_tvf_strict_mode_and_filter_ratio", "p0") {
);
"""
- exception """Encountered unqualified data, stop processing"""
- exception """url"""
+ // exception """Insert has filtered data in strict mode"""
+ exception """the length of input is too long"""
}
qt_sql_string_exceed_len_strict1 "select * from
test_insert_select_tvf_strict_mode_and_filter_ratio order by 1"
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]