From 264b37298cb5d54760a938748fde2e2656d0baa1 Mon Sep 17 00:00:00 2001 From: Bugen Zhao Date: Fri, 27 Sep 2024 17:34:42 +0800 Subject: [PATCH] update test Signed-off-by: Bugen Zhao --- e2e_test/ddl/max_parallelism.slt | 42 ++++++++++++++++++++++++-------- 1 file changed, 32 insertions(+), 10 deletions(-) diff --git a/e2e_test/ddl/max_parallelism.slt b/e2e_test/ddl/max_parallelism.slt index 45aa58185f31b..676b5616bd1ab 100644 --- a/e2e_test/ddl/max_parallelism.slt +++ b/e2e_test/ddl/max_parallelism.slt @@ -1,8 +1,29 @@ statement ok -create view table_parallelism as select t.name, tf.parallelism from rw_tables t, rw_table_fragments tf where t.id = tf.table_id; +create view table_parallelism as select t.name, tf.parallelism, tf.max_parallelism from rw_tables t, rw_table_fragments tf where t.id = tf.table_id; #### BEGIN +# Default max_parallelism should be 256. + +statement ok +set streaming_max_parallelism to default; + +statement ok +set streaming_parallelism to default; + +statement ok +create table t; + +query TT +select parallelism, max_parallelism from table_parallelism where name = 't'; +---- +ADAPTIVE 256 + +statement ok +drop table t; + + +# Test customized max_parallelism. statement ok set streaming_max_parallelism to 4; @@ -21,10 +42,10 @@ set streaming_parallelism to 4; statement ok create table t; -query T -select parallelism from table_parallelism where name = 't'; +query TT +select parallelism, max_parallelism from table_parallelism where name = 't'; ---- -FIXED(4) +FIXED(4) 4 statement ok drop table t; @@ -37,19 +58,19 @@ set streaming_parallelism to default; statement ok create table t; -query T -select parallelism from table_parallelism where name = 't'; +query TT +select parallelism, max_parallelism from table_parallelism where name = 't'; ---- -ADAPTIVE +ADAPTIVE 4 # Alter parallelism to a valid value, ok. statement ok alter table t set parallelism to 4; -query T -select parallelism from table_parallelism where name = 't'; +query TT +select parallelism, max_parallelism from table_parallelism where name = 't'; ---- -FIXED(4) +FIXED(4) 4 # Alter parallelism to an invalid value, return an error. statement error specified parallelism 8 should not exceed max parallelism 4 @@ -58,6 +79,7 @@ alter table t set parallelism to 8; statement ok drop table t; + #### END statement ok