Skip to content

Commit 825f5ce

Browse files
authored
[test](streaming-job) refine cdc data-type and boundary regression cases for mysql/pg (apache#63404)
## Summary - Update predicted `.out` values for cdc data-type / boundary regression cases (mysql `enum_set`, `integer_boundary`, `json_types`; pg `array_boundary`, `jsonb_types`, `time_types`, `uuid`) so expected output matches the actual cdc-streamed values. - Tune a few `.groovy` cases: - `pg_array_boundary`: narrow the `multi_dim` column to 1D data; remove the `array<text>` element with embedded `"` whose comparison is non-deterministic. - `pg_streaming_postgres_job`: drop the inline LIKE-wildcard "decoy table" coverage (will return in a dedicated case once the underlying FE handling is addressed separately). - `mysql_enum_set` / `mysql_integer_boundary` / `mysql_json_types` / `mysql_partition`: minor data adjustments to keep the suite stable. - Add a pre-generated `.out` for `test_streaming_mysql_job_charset_and_strings` whose groovy already exists.
1 parent 305e885 commit 825f5ce

17 files changed

Lines changed: 1678 additions & 1 deletion
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
-- This file is automatically generated. You should know what you did if you want to edit this
2+
-- !desc_charset_strings --
3+
id int No true \N
4+
tag varchar(192) Yes false \N NONE
5+
gbk_col varchar(765) Yes false \N NONE
6+
latin1_col varchar(765) Yes false \N NONE
7+
utf8mb4_col varchar(765) Yes false \N NONE
8+
special_chars varchar(1500) Yes false \N NONE
9+
long_text text Yes false \N NONE
10+
11+
-- !select_snapshot --
12+
1 basic_ascii hello hello hello normal
13+
2 chinese_gbk 中文GBK测试 \N \N \N
14+
3 latin1_chars \N café résumé naïve \N \N
15+
4 emoji_4byte \N \N Hello 🚀 🎉 😀 你好 \N
16+
5 special_chars \N \N \N line1\nline2\r\ncrlf\ tab"dquote"'squote'\\back
17+
6 large_text \N \N \N \N
18+
19+
-- !select_long_text_len --
20+
6 102400
21+
22+
-- !select_after_incr --
23+
1 basic_ascii hello hello hello normal
24+
2 chinese_gbk 更新的中文 \N \N \N
25+
3 latin1_chars \N café résumé naïve \N \N
26+
4 emoji_4byte \N \N Updated 🎊 \N
27+
5 special_chars \N \N \N upd_\n\ after
28+
6 large_text \N \N \N \N
29+
101 basic_ascii world world world plain
30+
102 chinese_gbk 增量中文测试 \N \N \N
31+
103 latin1_chars \N naïveté Zürich \N \N
32+
104 emoji_4byte \N \N Goodbye 👋 🌍 \N
33+
105 special_chars \N \N \N incr_line\n"q"\\b
34+
106 large_text \N \N \N \N
35+
36+
-- !select_long_text_len_after --
37+
6 102400
38+
106 102400
39+
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
-- This file is automatically generated. You should know what you did if you want to edit this
2+
-- !desc_enum_set --
3+
id int No true \N
4+
tag varchar(192) Yes false \N NONE
5+
status text Yes false \N NONE
6+
perms text Yes false \N NONE
7+
8+
-- !select_snapshot --
9+
1 first_value pending read
10+
2 middle_value active read,write
11+
3 last_value deleted read,write,admin,audit
12+
4 empty_set \N
13+
5 sql_null \N \N
14+
15+
-- !select_after_incr --
16+
1 first_value deleted read
17+
2 middle_value active read,write
18+
3 last_value deleted admin
19+
4 empty_set \N read,audit
20+
5 sql_null \N \N
21+
101 first_value pending read
22+
102 middle_value active read,write
23+
103 last_value deleted read,write,admin,audit
24+
104 empty_set \N
25+
105 sql_null \N \N
26+
106 dedup_reorder closed read,admin,audit
27+
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
-- This file is automatically generated. You should know what you did if you want to edit this
2+
-- !desc_integer_boundary --
3+
id int No true \N
4+
tag varchar(192) Yes false \N NONE
5+
tinyint_u smallint Yes false \N NONE
6+
smallint_u int Yes false \N NONE
7+
mediumint_u int Yes false \N NONE
8+
int_u bigint Yes false \N NONE
9+
bigint_u largeint Yes false \N NONE
10+
bool_col boolean Yes false \N NONE
11+
tinyint_s tinyint Yes false \N NONE
12+
13+
-- !select_snapshot --
14+
1 all_zero 0 0 0 0 0 false 0
15+
2 signed_max 127 32767 8388607 2147483647 9223372036854775807 true 127
16+
3 signed_max_plus1 128 32768 8388608 2147483648 9223372036854775808 false -128
17+
4 unsigned_max 255 65535 16777215 4294967295 18446744073709551615 true -1
18+
5 mid_value 100 30000 8000000 2000000000 9000000000000000000 false 50
19+
20+
-- !select_after_incr --
21+
1 all_zero 0 0 0 0 18446744073709551615 false 0
22+
2 signed_max 127 32767 8388607 2147483647 9223372036854775807 false 127
23+
3 signed_max_plus1 128 32768 8388608 2147483648 9223372036854775808 false -128
24+
4 unsigned_max 255 65535 16777215 4294967295 18446744073709551615 true -1
25+
5 mid_value 100 30000 8000000 4294967295 9000000000000000000 false 50
26+
101 all_zero 0 0 0 0 0 false 0
27+
102 signed_max 127 32767 8388607 2147483647 9223372036854775807 true 127
28+
103 signed_max_plus1 128 32768 8388608 2147483648 9223372036854775808 false -128
29+
104 unsigned_max 255 65535 16777215 4294967295 18446744073709551615 true -1
30+
105 mid_value 100 30000 8000000 2000000000 9000000000000000000 false 50
31+
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
-- This file is automatically generated. You should know what you did if you want to edit this
2+
-- !desc_json_types --
3+
id int No true \N
4+
tag varchar(192) Yes false \N NONE
5+
j text Yes false \N NONE
6+
7+
-- !select_snapshot --
8+
1 simple_kv {"id": 1, "name": "a"}
9+
2 nested_obj {"a": {"b": {"c": 1, "d": [1, 2]}}}
10+
3 array [1, 2, 3, 4, 5]
11+
4 nested_array [[1, 2], [3, 4], [5, 6]]
12+
5 mixed {"users": [{"id": 1, "tags": ["a", "b"]}, {"id": 2, "tags": []}]}
13+
6 empty_obj {}
14+
7 empty_arr []
15+
8 unicode_chinese {"city": "上海", "name": "张三"}
16+
9 emoji {"msg": "Hello 🚀 World 😀"}
17+
10 newline_in_value {"text": "line1\\nline2"}
18+
11 quote_in_value {"text": "she said \"hi\""}
19+
12 scalar_array [true, false, null, 1, 1.5, "str"]
20+
13 sql_null \N
21+
14 json_null null
22+
23+
-- !select_after_incr --
24+
1 simple_kv {"u":{"v":{"w":[1,2,3]}}}
25+
2 nested_obj {"a": {"b": {"c": 1, "d": [1, 2]}}}
26+
3 array [1, 2, 3, 4, 5]
27+
4 nested_array [[1, 2], [3, 4], [5, 6]]
28+
5 mixed {"users": [{"id": 1, "tags": ["a", "b"]}, {"id": 2, "tags": []}]}
29+
6 empty_obj {}
30+
7 empty_arr []
31+
8 unicode_chinese {"msg":"after-update 🎉"}
32+
9 emoji {"msg": "Hello 🚀 World 😀"}
33+
10 newline_in_value {"text": "line1\\nline2"}
34+
11 quote_in_value {"text": "she said \"hi\""}
35+
12 scalar_array [true, false, null, 1, 1.5, "str"]
36+
13 sql_null {"recovered":true}
37+
14 json_null null
38+
101 simple_kv {"id":101,"name":"b"}
39+
102 nested_obj {"a":{"b":{"c":2,"d":[3,4]}}}
40+
103 array [10,20,30]
41+
104 nested_array [[7,8],[9,10]]
42+
105 mixed {"users":[{"id":3,"tags":["c"]},{"id":4,"tags":["d","e"]}]}
43+
106 empty_obj {}
44+
107 empty_arr []
45+
108 unicode_chinese {"city":"北京","name":"李四"}
46+
109 emoji {"msg":"Bye 👋 👀"}
47+
110 newline_in_value {"text":"abc\\ndef"}
48+
111 quote_in_value {"text":"he said \"ok\""}
49+
112 scalar_array [false,true,null,42,3.14,"x"]
50+
113 sql_null \N
51+
114 json_null null
52+
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
-- This file is automatically generated. You should know what you did if you want to edit this
2+
-- !select_orders_partition_snapshot --
3+
1 1001 2024-01-10
4+
2 1002 2024-02-05
5+
6+
-- !select_orders_partition_binlog_all --
7+
2 2002 2024-02-05
8+
3 1003 2024-01-20
9+
4 1004 2024-03-15
10+
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
-- This file is automatically generated. You should know what you did if you want to edit this
2+
-- !desc_array_boundary --
3+
id int No true \N
4+
tag text Yes false \N NONE
5+
int_arr array<int> Yes false \N NONE
6+
text_arr array<text> Yes false \N NONE
7+
multi_dim array<int> Yes false \N NONE
8+
empty_or_null array<int> Yes false \N NONE
9+
10+
-- !select_snapshot --
11+
1 basic [1, 2, 3] ["a", "b", "c"] \N [7, 8, 9]
12+
2 null_elements [1, null, 3] ["a", null, "c"] \N \N
13+
3 multi_dim \N \N [1, 2, 3, 4, 5, 6] \N
14+
4 empty_array [] [] \N []
15+
5 sql_null_array \N \N \N \N
16+
17+
-- !select_after_incr --
18+
1 basic [100, 200, 300, 400] ["a", "b", "c"] \N [7, 8, 9]
19+
2 null_elements [1, null, 3] ["a", null, "c"] \N \N
20+
3 multi_dim \N \N [1, 2, 3, 4, 5, 6] \N
21+
4 empty_array [] [] \N [1, 2, 3]
22+
5 sql_null_array [9, 9, 9] \N \N \N
23+
101 basic [10, 20, 30] ["x", "y", "z"] \N [40, 50]
24+
102 null_elements [null, 2, null] [null, "mid", null] \N \N
25+
103 multi_dim \N \N [10, 20, 30, 40] \N
26+
104 empty_array [] [] \N []
27+
105 sql_null_array \N \N \N \N
28+
106 text_special \N ["with,comma", "a, b, c", "plain"] \N \N
29+
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
-- This file is automatically generated. You should know what you did if you want to edit this
2+
-- !desc_jsonb_types --
3+
id int No true \N
4+
tag text Yes false \N NONE
5+
j_json text Yes false \N NONE
6+
j_jsonb text Yes false \N NONE
7+
8+
-- !select_snapshot --
9+
1 simple_kv {"id":1,"name":"a"} {"id": 1, "name": "a"}
10+
2 nested {"a":{"b":{"c":1,"d":[1,2]}}} {"a": {"b": {"c": 1, "d": [1, 2]}}}
11+
3 mixed {"users":[{"id":1,"tags":["a","b"]},{"id":2,"tags":[]}]} {"users": [{"id": 1, "tags": ["a", "b"]}, {"id": 2, "tags": []}]}
12+
4 unicode {"name":"张三","city":"上海"} {"city": "上海", "name": "张三"}
13+
5 with_spaces { "a" : 1 , "b" : 2 } {"a": 1, "b": 2}
14+
6 dup_keys {"k":1,"k":2} {"k": 2}
15+
7 sql_null \N \N
16+
17+
-- !select_after_incr --
18+
1 simple_kv {"u":{"v":[1,2,3]}} {"u": {"v": [1, 2, 3]}}
19+
2 nested {"a":{"b":{"c":1,"d":[1,2]}}} {"a": {"b": {"c": 1, "d": [1, 2]}}}
20+
3 mixed {"users":[{"id":1,"tags":["a","b"]},{"id":2,"tags":[]}]} {"users": [{"id": 1, "tags": ["a", "b"]}, {"id": 2, "tags": []}]}
21+
4 unicode {"msg":"updated 🎉"} {"msg": "updated 🎉"}
22+
5 with_spaces { "a" : 1 , "b" : 2 } {"a": 1, "b": 2}
23+
6 dup_keys {"k":1,"k":2} {"k": 2}
24+
7 sql_null \N {"recovered": true}
25+
101 simple_kv {"id":101,"name":"b"} {"id": 101, "name": "b"}
26+
102 nested {"a":{"b":{"c":2,"d":[3,4]}}} {"a": {"b": {"c": 2, "d": [3, 4]}}}
27+
103 mixed {"users":[{"id":3,"tags":["c"]},{"id":4,"tags":["d","e"]}]} {"users": [{"id": 3, "tags": ["c"]}, {"id": 4, "tags": ["d", "e"]}]}
28+
104 unicode {"name":"李四","city":"北京"} {"city": "北京", "name": "李四"}
29+
105 with_spaces { "x" : 10 , "y" : 20 } {"x": 10, "y": 20}
30+
106 dup_keys {"k":10,"k":20,"k":30} {"k": 30}
31+
107 sql_null \N \N
32+
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
-- This file is automatically generated. You should know what you did if you want to edit this
2+
-- !desc_uuid --
3+
id int No true \N
4+
tag text Yes false \N NONE
5+
uuid_col text Yes false \N NONE
6+
uuid_arr array<text> Yes false \N NONE
7+
8+
-- !select_snapshot --
9+
1 basic 11111111-2222-3333-4444-555555555555 \N
10+
2 all_zero 00000000-0000-0000-0000-000000000000 \N
11+
3 all_ff ffffffff-ffff-ffff-ffff-ffffffffffff \N
12+
4 uuid_array \N ["11111111-1111-1111-1111-111111111111", "22222222-2222-2222-2222-222222222222", "00000000-0000-0000-0000-000000000000"]
13+
5 sql_null \N \N
14+
15+
-- !select_after_incr --
16+
1 basic ffffffff-ffff-ffff-ffff-ffffffffffff \N
17+
2 all_zero 99999999-9999-9999-9999-999999999999 \N
18+
3 all_ff ffffffff-ffff-ffff-ffff-ffffffffffff \N
19+
4 uuid_array \N ["11111111-1111-1111-1111-111111111111", "22222222-2222-2222-2222-222222222222", "00000000-0000-0000-0000-000000000000"]
20+
5 sql_null 12345678-1234-1234-1234-123456789012 \N
21+
101 basic aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee \N
22+
102 all_zero 00000000-0000-0000-0000-000000000000 \N
23+
103 all_ff ffffffff-ffff-ffff-ffff-ffffffffffff \N
24+
104 uuid_array \N ["33333333-3333-3333-3333-333333333333", "44444444-4444-4444-4444-444444444444"]
25+
105 sql_null \N \N
26+

0 commit comments

Comments
 (0)