@@ -55,7 +55,7 @@ suite("test_multi_partition_key", "p0") {
55
55
sql " select * from ${ tableName} order by k1, k2"
56
56
resultFile " partition_table.out"
57
57
}
58
- def result = sql " SHOW PARTITIONS FROM ${ tableName} "
58
+ def result = sql_return_maparray " SHOW PARTITIONS FROM ${ tableName} "
59
59
assertTrue (result. size() > 1 )
60
60
if (ifDropTbl) {
61
61
try_sql """ DROP TABLE ${ tableName} """
@@ -143,8 +143,8 @@ suite("test_multi_partition_key", "p0") {
143
143
false
144
144
)
145
145
// expect partition_f range: [ [126, 126] ~ [500, -128] )
146
- def ret = sql " SHOW PARTITIONS FROM test_default_minvalue WHERE PartitionName='partition_f'"
147
- assertTrue (ret[0 ][ 6 ] . contains(" [500, -128]" ))
146
+ def ret = sql_return_maparray " SHOW PARTITIONS FROM test_default_minvalue WHERE PartitionName='partition_f'"
147
+ assertTrue (ret[0 ]. Range . contains(" [500, -128]" ))
148
148
149
149
// partition columns error
150
150
test {
@@ -225,8 +225,8 @@ suite("test_multi_partition_key", "p0") {
225
225
}
226
226
227
227
sql " ALTER TABLE test_multi_col_test_partition_add ADD PARTITION partition_add VALUES LESS THAN ('30', '1000') "
228
- def ret_add_p = sql " SHOW PARTITIONS FROM test_multi_col_test_partition_add WHERE PartitionName='partition_add'"
229
- assertTrue (ret[0 ][ 6 ] . contains(" [500, -128]" ))
228
+ def ret_add_p = sql_return_maparray " SHOW PARTITIONS FROM test_multi_col_test_partition_add WHERE PartitionName='partition_add'"
229
+ assertTrue (ret[0 ]. Range . contains(" [500, -128]" ))
230
230
test {
231
231
sql " ALTER TABLE test_multi_col_test_partition_add ADD PARTITION add_partition_wrong " +
232
232
" VALUES LESS THAN ('30', '800') DISTRIBUTED BY hash(k1) BUCKETS 5"
@@ -247,11 +247,11 @@ suite("test_multi_partition_key", "p0") {
247
247
false
248
248
)
249
249
sql " ALTER TABLE test_multi_col_test_partition_drop DROP PARTITION partition_d"
250
- def ret_drop_p = sql " SHOW PARTITIONS FROM test_multi_col_test_partition_drop WHERE PartitionName='partition_d'"
250
+ def ret_drop_p = sql_return_maparray " SHOW PARTITIONS FROM test_multi_col_test_partition_drop WHERE PartitionName='partition_d'"
251
251
assertEquals (0 , ret_drop_p. size())
252
252
sql " ALTER TABLE test_multi_col_test_partition_drop ADD PARTITION partition_dd VALUES LESS THAN ('0','0') "
253
- ret_drop_p = sql " SHOW PARTITIONS FROM test_multi_col_test_partition_drop WHERE PartitionName='partition_dd'"
254
- assertTrue (ret_drop_p[0 ][ 6 ] . contains(" [0, 0]" ))
253
+ ret_drop_p = sql_return_maparray " SHOW PARTITIONS FROM test_multi_col_test_partition_drop WHERE PartitionName='partition_dd'"
254
+ assertTrue (ret_drop_p[0 ]. Range . contains(" [0, 0]" ))
255
255
// null value in the lowest partition, if drop the partition null is deleted.
256
256
sql """ drop table if exists test_multi_col_test_partition_null_value"""
257
257
sql """
@@ -367,8 +367,8 @@ suite("test_multi_partition_key", "p0") {
367
367
qt_sql12 " select * from test_multi_col_test_rollup order by k1, k2"
368
368
// test partition modify, check partition replication_num
369
369
sql " ALTER TABLE test_multi_col_test_rollup MODIFY PARTITION partition_a SET( 'replication_num' = '1')"
370
- ret = sql " SHOW PARTITIONS FROM test_multi_col_test_rollup WHERE PartitionName='partition_a'"
371
- assertEquals (' 1 ' , ret[0 ][ 9 ] )
370
+ ret = sql_return_maparray " SHOW PARTITIONS FROM test_multi_col_test_rollup WHERE PartitionName='partition_a'"
371
+ assertEquals (1 , ret[0 ]. ReplicationNum as int )
372
372
// create table with range partition
373
373
testPartitionTbl(
374
374
" test_multi_column_fixed_range_1" ,
@@ -394,7 +394,7 @@ suite("test_multi_partition_key", "p0") {
394
394
)
395
395
// add partition with range
396
396
sql " ALTER TABLE test_multi_column_fixed_range_1 ADD PARTITION partition_add VALUES LESS THAN ('50','1000') "
397
- ret = sql " SHOW PARTITIONS FROM test_multi_column_fixed_range_1 WHERE PartitionName='partition_add'"
397
+ ret = sql_return_maparray " SHOW PARTITIONS FROM test_multi_column_fixed_range_1 WHERE PartitionName='partition_add'"
398
398
assertEquals (1 , ret. size(), )
399
399
test {
400
400
sql " ALTER TABLE test_multi_column_fixed_range_1 ADD PARTITION add_partition_wrong VALUES LESS THAN ('50','800')"
0 commit comments