Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
Signed-off-by: Bugen Zhao <[email protected]>
  • Loading branch information
BugenZhao committed Sep 30, 2024
1 parent ba6ba4d commit 264b372
Showing 1 changed file with 32 additions and 10 deletions.
42 changes: 32 additions & 10 deletions e2e_test/ddl/max_parallelism.slt
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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;
Expand All @@ -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
Expand All @@ -58,6 +79,7 @@ alter table t set parallelism to 8;
statement ok
drop table t;


#### END

statement ok
Expand Down

0 comments on commit 264b372

Please sign in to comment.