Skip to content

Commit 35e6844

Browse files
tiannan-srclaude
andcommitted
[UT] Sync branch-4.1 SQL-tester deployment-mode fixes to branch-4.0
The 4.0.13 release qualification ran the full suite in shared-data mode and exposed ~30 cases whose SHOW CREATE / DESC expectations were recorded in shared-nothing mode. branch-4.1/main already resolved all of them (mostly by tagging the literal-expectation cases @Native, plus case restructuring and the #76023/#76298 fix batches); this ports the branch-4.1 versions of the affected T/R files to branch-4.0: - @Native tagging: sort_key (4 files), alter_column_comment, column_rename2, fast_schema_evolution, automatic_partition (3), optimize_table, recovery, show_materialized_view, mv_with_index, primary_index_cache_expire, dictionary, materialized_column, add_drop_field, temporary_table, boolean_default, automatic_bucket, lake_rollup, random_distribution - arrow_flight_2: wait_alter_table_finish() after ALTERs (async SC tolerant) - expr_str2date: COMMENT "OLAP" tolerated at both positions (#76298) - create_storage_volume: aws.s3.use_web_identity_token_file in DESC (#69966) - builtin_storage_volume_bindings: @Sequential (default-SV flip isolation) - partial_update (column mode): quoting + Expect:100-continue fixes and the lake case variants from branch-4.1 One 4.0-specific adjustment on top of the port: branch-4.0's CreateTableAnalyzer says "<KEYS> must use hash distribution" where 4.1 says "cannot use random distribution"; test_random_distribution's three create-path error expectations are restored to the 4.0 wording. Not touched (suspected product/build issues, reported separately): the "schema change operation is in progress" cluster + missing cloud_native_fast_schema_evolution_v2 property (enterprise 4.0.13 FSE regression suspect), iceberg_parse_predicates_1/_3 row-count deficits, struct_schema_change load_segments sub_column meta error, online_optimize_table_pk CANCELLED, mv rewrite misses, and the statistics/ASAN-timeout environment failures. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent a673d66 commit 35e6844

54 files changed

Lines changed: 717 additions & 448 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

test/sql/test_add_drop_field/R/test_add_drop_field

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
-- name: test_add_drop_field_struct
1+
-- name: test_add_drop_field_struct @mac
22
create database test_add_drop_field_struct;
33
-- result:
44
-- !result
@@ -29,15 +29,15 @@ select * from tab1;
2929
-- !result
3030
alter table tab1 modify column c1 add field v1.v5 int;
3131
-- result:
32-
E: (1064, 'Getting analyzing error. Detail message: Analyze add field definition failed: Field v1 type INT is not valid.')
32+
E: (1064, 'Getting analyzing error. Detail message: Field v1 type INT is not valid.')
3333
-- !result
3434
alter table tab1 modify column c1 add field v2 int;
3535
-- result:
36-
E: (1064, 'Getting analyzing error. Detail message: Analyze add field definition failed: Field v2 is already exist.')
36+
E: (1064, 'Getting analyzing error. Detail message: Field v2 is already exist.')
3737
-- !result
3838
alter table tab1 modify column c1 add field v2.v3 int;
3939
-- result:
40-
E: (1064, 'Getting analyzing error. Detail message: Analyze add field definition failed: Field v3 is already exist.')
40+
E: (1064, 'Getting analyzing error. Detail message: Field v3 is already exist.')
4141
-- !result
4242
alter table tab1 modify column c1 add field val1 int;
4343
-- result:
@@ -81,7 +81,7 @@ select * from tab1;
8181
-- !result
8282
alter table tab1 modify column c1 drop field v2.v5;
8383
-- result:
84-
E: (1064, 'Getting analyzing error. Detail message: Analyze drop field definition failed: Drop field v5 is not found.')
84+
E: (1064, 'Getting analyzing error. Detail message: Drop field v5 is not found.')
8585
-- !result
8686
alter table tab1 modify column c1 drop field v1;
8787
-- result:
@@ -160,15 +160,15 @@ select * from tab1;
160160
-- !result
161161
alter table tab1 modify column c1 drop field [*];
162162
-- result:
163-
E: (1064, 'Getting analyzing error. Detail message: Analyze drop field definition failed: Target Field is not struct.')
163+
E: (1064, 'Getting analyzing error. Detail message: Target Field is not struct.')
164164
-- !result
165165
alter table tab1 modify column c1 drop field [*].v3;
166166
-- result:
167-
E: (1064, 'Getting analyzing error. Detail message: Analyze drop field definition failed: Drop field v3 is not found.')
167+
E: (1064, 'Getting analyzing error. Detail message: Drop field v3 is not found.')
168168
-- !result
169169
alter table tab1 modify column c1 add field val1 int;
170170
-- result:
171-
E: (1064, 'Getting analyzing error. Detail message: Analyze add field definition failed: Target Field is not struct.')
171+
E: (1064, 'Getting analyzing error. Detail message: Target Field is not struct.')
172172
-- !result
173173
alter table tab1 modify column c1 add field [*].val1 int;
174174
-- result:
@@ -268,7 +268,7 @@ drop database test_add_drop_field_array;
268268

269269

270270

271-
-- name: test_add_drop_field_not_allowed
271+
-- name: test_add_drop_field_not_allowed @native
272272
create database test_add_drop_field_not_allowed;
273273
-- result:
274274
-- !result

test/sql/test_add_drop_field/T/test_add_drop_field

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
-- name: test_add_drop_field_struct
1+
-- name: test_add_drop_field_struct @mac
22
create database test_add_drop_field_struct;
33
use test_add_drop_field_struct;
44

@@ -105,7 +105,7 @@ drop table tab1;
105105
drop database test_add_drop_field_array;
106106

107107

108-
-- name: test_add_drop_field_not_allowed
108+
-- name: test_add_drop_field_not_allowed @native
109109

110110
create database test_add_drop_field_not_allowed;
111111
use test_add_drop_field_not_allowed;

test/sql/test_alter_table/R/test_alter_column_comment

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
-- name: test_alter_table_column_comment
1+
-- name: test_alter_table_column_comment @native
22
create table t(k int, v int) primary key(k);
33
-- result:
44
-- !result

test/sql/test_alter_table/T/test_alter_column_comment

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
-- name: test_alter_table_column_comment
1+
-- name: test_alter_table_column_comment @native
22
create table t(k int, v int) primary key(k);
33
show create table t;
44
alter table t modify column k comment 'k';
Lines changed: 27 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,104 +1,101 @@
11
-- name: test_arrow_flight_2 @arrow_flight_sql
2-
DROP DATABASE IF EXISTS flight_demo;
3-
-- result:
4-
-- !result
5-
6-
CREATE DATABASE flight_demo;
7-
-- result:
8-
-- !result
9-
10-
USE flight_demo;
11-
-- result:
12-
-- !result
132

14-
CREATE TABLE flight_demo.test (id INT, name STRING) ENGINE=OLAP PRIMARY KEY (id) DISTRIBUTED BY HASH(id) BUCKETS 1 PROPERTIES ('replication_num' = '1');
3+
CREATE TABLE test (id INT, name STRING) ENGINE=OLAP PRIMARY KEY (id) DISTRIBUTED BY HASH(id) BUCKETS 1 PROPERTIES ('replication_num' = '1');
154
-- result:
165
-- !result
176

18-
INSERT INTO flight_demo.test VALUES (1, 'Alice'), (2, 'Bob');
7+
INSERT INTO test VALUES (1, 'Alice'), (2, 'Bob');
198
-- result:
209
-- !result
2110

22-
INSERT INTO flight_demo.test VALUES (1, 'Alice'), (2, 'Bob');
11+
INSERT INTO test VALUES (1, 'Alice'), (2, 'Bob');
2312
-- result:
2413
-- !result
2514

26-
INSERT INTO flight_demo.test VALUES (3, 'Zac'), (4, 'Tom');
15+
INSERT INTO test VALUES (3, 'Zac'), (4, 'Tom');
2716
-- result:
2817
-- !result
2918

30-
SELECT * FROM flight_demo.test order by id asc;
19+
SELECT * FROM test order by id asc;
3120
-- result:
3221
1 Alice
3322
2 Bob
3423
3 Zac
3524
4 Tom
3625
-- !result
3726

38-
UPDATE flight_demo.test SET name = 'Charlie' WHERE id = 1;
27+
UPDATE test SET name = 'Charlie' WHERE id = 1;
3928
-- result:
4029
-- !result
4130

42-
SELECT * FROM flight_demo.test order by id asc;
31+
SELECT * FROM test order by id asc;
4332
-- result:
4433
1 Charlie
4534
2 Bob
4635
3 Zac
4736
4 Tom
4837
-- !result
4938

50-
UPDATE flight_demo.test SET name = 'Charlie' WHERE id = 1;
39+
UPDATE test SET name = 'Charlie' WHERE id = 1;
5140
-- result:
5241
-- !result
5342

54-
SELECT * FROM flight_demo.test order by id asc;
43+
SELECT * FROM test order by id asc;
5544
-- result:
5645
1 Charlie
5746
2 Bob
5847
3 Zac
5948
4 Tom
6049
-- !result
6150

62-
DELETE FROM flight_demo.test WHERE id = 2;
51+
DELETE FROM test WHERE id = 2;
6352
-- result:
6453
-- !result
6554

66-
ALTER TABLE flight_demo.test ADD COLUMN age INT;
55+
ALTER TABLE test ADD COLUMN age INT;
56+
-- result:
57+
-- !result
58+
function: wait_alter_table_finish()
6759
-- result:
60+
None
6861
-- !result
6962

70-
ALTER TABLE flight_demo.test MODIFY COLUMN name STRING;
63+
ALTER TABLE test MODIFY COLUMN name STRING;
64+
-- result:
65+
-- !result
66+
function: wait_alter_table_finish()
7167
-- result:
68+
None
7269
-- !result
7370

74-
INSERT INTO flight_demo.test (id, name, age) VALUES (5, 'Eve', 30);
71+
INSERT INTO test (id, name, age) VALUES (5, 'Eve', 30);
7572
-- result:
7673
-- !result
7774

78-
SELECT * FROM flight_demo.test WHERE id = 5;
75+
SELECT * FROM test WHERE id = 5;
7976
-- result:
8077
5 Eve 30
8178
-- !result
8279

83-
SELECT * FROM flight_demo.test order by id asc;
80+
SELECT * FROM test order by id asc;
8481
-- result:
8582
1 Charlie None
8683
3 Zac None
8784
4 Tom None
8885
5 Eve 30
8986
-- !result
9087

91-
[UC]SHOW CREATE TABLE flight_demo.test;
88+
[UC]SHOW CREATE TABLE test;
9289

93-
CREATE TABLE flight_demo.test2 (id INT, age INT) ENGINE=OLAP PRIMARY KEY (id) DISTRIBUTED BY HASH(id) BUCKETS 1 PROPERTIES ('replication_num' = '1');
90+
CREATE TABLE test2 (id INT, age INT) ENGINE=OLAP PRIMARY KEY (id) DISTRIBUTED BY HASH(id) BUCKETS 1 PROPERTIES ('replication_num' = '1');
9491
-- result:
9592
-- !result
9693

97-
INSERT INTO flight_demo.test2 VALUES (1, 18), (2, 20);
94+
INSERT INTO test2 VALUES (1, 18), (2, 20);
9895
-- result:
9996
-- !result
10097

101-
SELECT * FROM (SELECT id, name FROM flight_demo.test) AS sub WHERE id = 1;
98+
SELECT * FROM (SELECT id, name FROM test) AS sub WHERE id = 1;
10299
-- result:
103100
1 Charlie
104101
-- !result
Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,43 @@
11
-- name: test_arrow_flight_2 @arrow_flight_sql
2-
DROP DATABASE IF EXISTS flight_demo;
32

4-
CREATE DATABASE flight_demo;
3+
CREATE TABLE test (id INT, name STRING) ENGINE=OLAP PRIMARY KEY (id) DISTRIBUTED BY HASH(id) BUCKETS 1 PROPERTIES ('replication_num' = '1');
54

6-
USE flight_demo;
5+
INSERT INTO test VALUES (1, 'Alice'), (2, 'Bob');
76

8-
CREATE TABLE flight_demo.test (id INT, name STRING) ENGINE=OLAP PRIMARY KEY (id) DISTRIBUTED BY HASH(id) BUCKETS 1 PROPERTIES ('replication_num' = '1');
7+
INSERT INTO test VALUES (1, 'Alice'), (2, 'Bob');
98

10-
INSERT INTO flight_demo.test VALUES (1, 'Alice'), (2, 'Bob');
9+
INSERT INTO test VALUES (3, 'Zac'), (4, 'Tom');
1110

12-
INSERT INTO flight_demo.test VALUES (1, 'Alice'), (2, 'Bob');
11+
SELECT * FROM test order by id asc;
1312

14-
INSERT INTO flight_demo.test VALUES (3, 'Zac'), (4, 'Tom');
13+
UPDATE test SET name = 'Charlie' WHERE id = 1;
1514

16-
SELECT * FROM flight_demo.test order by id asc;
15+
SELECT * FROM test order by id asc;
1716

18-
UPDATE flight_demo.test SET name = 'Charlie' WHERE id = 1;
17+
UPDATE test SET name = 'Charlie' WHERE id = 1;
1918

20-
SELECT * FROM flight_demo.test order by id asc;
19+
SELECT * FROM test order by id asc;
2120

22-
UPDATE test SET name = 'Charlie' WHERE id = 1;
21+
DELETE FROM test WHERE id = 2;
2322

24-
SELECT * FROM flight_demo.test order by id asc;
23+
ALTER TABLE test ADD COLUMN age INT;
2524

26-
DELETE FROM flight_demo.test WHERE id = 2;
25+
function: wait_alter_table_finish()
2726

28-
ALTER TABLE flight_demo.test ADD COLUMN age INT;
27+
ALTER TABLE test MODIFY COLUMN name STRING;
2928

30-
ALTER TABLE flight_demo.test MODIFY COLUMN name STRING;
29+
function: wait_alter_table_finish()
3130

32-
INSERT INTO flight_demo.test (id, name, age) VALUES (5, 'Eve', 30);
31+
INSERT INTO test (id, name, age) VALUES (5, 'Eve', 30);
3332

34-
SELECT * FROM flight_demo.test WHERE id = 5;
33+
SELECT * FROM test WHERE id = 5;
3534

36-
SELECT * FROM flight_demo.test order by id asc;
35+
SELECT * FROM test order by id asc;
3736

38-
SHOW CREATE TABLE flight_demo.test;
37+
[UC]SHOW CREATE TABLE test;
3938

40-
CREATE TABLE flight_demo.test2 (id INT, age INT) ENGINE=OLAP PRIMARY KEY (id) DISTRIBUTED BY HASH(id) BUCKETS 1 PROPERTIES ('replication_num' = '1');
39+
CREATE TABLE test2 (id INT, age INT) ENGINE=OLAP PRIMARY KEY (id) DISTRIBUTED BY HASH(id) BUCKETS 1 PROPERTIES ('replication_num' = '1');
4140

42-
INSERT INTO flight_demo.test2 VALUES (1, 18), (2, 20);
41+
INSERT INTO test2 VALUES (1, 18), (2, 20);
4342

44-
SELECT * FROM (SELECT id, name FROM flight_demo.test) AS sub WHERE id = 1;
43+
SELECT * FROM (SELECT id, name FROM test) AS sub WHERE id = 1;

test/sql/test_automatic_bucket/R/test_automatic_partition

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
-- name: test_bucket_size
1+
-- name: test_bucket_size @native
22
create table t(k int);
33
-- result:
44
-- !result
@@ -72,7 +72,7 @@ alter table t set('bucket_size'='2048');
7272

7373

7474

75-
-- name: test_automatic_bucket
75+
-- name: test_automatic_bucket @native
7676
create database kkk;
7777
-- result:
7878
-- !result
@@ -551,7 +551,7 @@ t CREATE TABLE `t` (
551551
`v` int(11) NULL COMMENT ""
552552
) ENGINE=OLAP
553553
DUPLICATE KEY(`k`, `v`)
554-
PARTITION BY date_trunc('DAY', `k`)
554+
PARTITION BY DATE_TRUNC('DAY', `k`)
555555
DISTRIBUTED BY RANDOM
556556
PROPERTIES (
557557
"bucket_size" = "1",
@@ -583,7 +583,7 @@ t CREATE TABLE `t` (
583583
`v` int(11) NULL COMMENT ""
584584
) ENGINE=OLAP
585585
DUPLICATE KEY(`k`, `v`)
586-
PARTITION BY date_trunc('DAY', `k`)
586+
PARTITION BY DATE_TRUNC('DAY', `k`)
587587
DISTRIBUTED BY RANDOM
588588
PROPERTIES (
589589
"bucket_size" = "1",

test/sql/test_automatic_bucket/T/test_automatic_partition

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
-- name: test_bucket_size
1+
-- name: test_bucket_size @native
22
create table t(k int);
33
show create table t;
44
alter table t set('bucket_size'='1024');
@@ -12,7 +12,7 @@ alter table t set('bucket_size'='0');
1212
alter table t set('bucket_size'='-1');
1313
alter table t set('bucket_size'='2048');
1414

15-
-- name: test_automatic_bucket
15+
-- name: test_automatic_bucket @native
1616
create database kkk;
1717
use kkk;
1818
create table t(k int);

test/sql/test_automatic_partition/R/test_automatic_partition_concurrent

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
-- name: test_concurrent_create_partition
1+
-- name: test_concurrent_create_partition @native
22
create table t(k int) distributed by random buckets 120;
33
-- result:
44
-- !result

test/sql/test_automatic_partition/R/test_multi_expr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ select * from test;
556556

557557

558558

559-
-- name: test_create_table_like
559+
-- name: test_create_table_like @native
560560
CREATE TABLE base_tbl (
561561
`k1` date,
562562
`k2` datetime,

0 commit comments

Comments
 (0)