Skip to content

Commit c753b22

Browse files
authored
[regression test](schema change) add boolean type check for agg (apache#30186)
1 parent a9dd715 commit c753b22

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

regression-test/suites/schema_change_p0/test_schema_change_agg.groovy

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,5 +191,33 @@ suite("test_schema_change_agg", "p0") {
191191
assertEquals(2, row[1]);
192192
assertEquals(3, row[2]);
193193
}
194+
195+
// boolean type
196+
sql """ alter table ${tableName3} add column v15 boolean replace NOT NULL default "0" after k13 """
197+
198+
sleep(10)
199+
max_try_num = 6000
200+
while (max_try_num--) {
201+
String res = getJobState(tableName3)
202+
if (res == "FINISHED" || res == "CANCELLED") {
203+
assertEquals("FINISHED", res)
204+
sleep(3000)
205+
break
206+
} else {
207+
sleep(2000)
208+
if (max_try_num < 1){
209+
assertEquals(1,2)
210+
}
211+
}
212+
}
213+
214+
sql """ insert into ${tableName3} values (10002, 2, 3, 4, 5, 6.6, 1.7, 8.81,
215+
'a', 'b', 'c', '2021-10-30', '2021-10-30 00:00:00', true) """
216+
217+
test {
218+
sql """ALTER table ${tableName3} modify COLUMN v15 int replace NOT NULL default "0" after k13"""
219+
exception "Can not change BOOLEAN to INT"
220+
}
221+
194222
}
195223

0 commit comments

Comments
 (0)