diff --git a/tests/suites/0_stateless/05_hints/05_0001_set_var.result b/tests/suites/0_stateless/05_hints/05_0001_set_var.result index 45cbaeaebadff..b28b974434947 100644 --- a/tests/suites/0_stateless/05_hints/05_0001_set_var.result +++ b/tests/suites/0_stateless/05_hints/05_0001_set_var.result @@ -23,5 +23,5 @@ America/Toronto 1 2022-02-02 03:00:00 2022-02-02 03:00:00 -1 13 427 +1 13 Asia/Shanghai diff --git a/tests/suites/0_stateless/05_hints/05_0001_set_var.sh b/tests/suites/0_stateless/05_hints/05_0001_set_var.sh index 3b75b9a248da7..54ef0c28fede5 100755 --- a/tests/suites/0_stateless/05_hints/05_0001_set_var.sh +++ b/tests/suites/0_stateless/05_hints/05_0001_set_var.sh @@ -35,6 +35,7 @@ echo "set timezone='America/Toronto'; insert /*+SET_VAR(timezone='Asia/Shanghai' echo "drop database set_var;" | $BENDSQL_CLIENT_CONNECT echo "drop stage if exists s2" | $BENDSQL_CLIENT_CONNECT echo "create stage s2" | $BENDSQL_CLIENT_CONNECT -echo "copy /*+SET_VAR(timezone='Asia/Shanghai') */ into @s2 from (select timezone()); " | $BENDSQL_CLIENT_CONNECT +# The last column, `output_bytes`, is intentionally removed to avoid flaky tests. +echo "copy /*+SET_VAR(timezone='Asia/Shanghai') */ into @s2 from (select timezone()); " | $BENDSQL_CLIENT_CONNECT | cut -f1-2 echo "select * from @s2 " | $BENDSQL_CLIENT_CONNECT echo "drop stage s2" | $BENDSQL_CLIENT_CONNECT diff --git a/tests/suites/0_stateless/18_rbac/18_0002_ownership_cover.result b/tests/suites/0_stateless/18_rbac/18_0002_ownership_cover.result index bf32053ef5ed1..463053b458bd4 100644 --- a/tests/suites/0_stateless/18_rbac/18_0002_ownership_cover.result +++ b/tests/suites/0_stateless/18_rbac/18_0002_ownership_cover.result @@ -2,7 +2,7 @@ 1 200 === test stage === -1 8 400 +1 8 0 === test udf === 2 diff --git a/tests/suites/0_stateless/18_rbac/18_0002_ownership_cover.sh b/tests/suites/0_stateless/18_rbac/18_0002_ownership_cover.sh index 16881d0741566..4f7ffe65b2cc3 100755 --- a/tests/suites/0_stateless/18_rbac/18_0002_ownership_cover.sh +++ b/tests/suites/0_stateless/18_rbac/18_0002_ownership_cover.sh @@ -41,7 +41,7 @@ echo "select * from d_0002.t" | $TEST_USER_CONNECT ## stage echo "=== test stage ===" echo 'create stage hello' | $TEST_USER_CONNECT -echo 'COPY INTO @hello from (select number from numbers(1)) FILE_FORMAT = (type = parquet)' | $TEST_USER_CONNECT +echo 'COPY INTO @hello from (select number from numbers(1)) FILE_FORMAT = (type = parquet)' | $TEST_USER_CONNECT | cut -f1-2 echo 'select * from @hello' | $TEST_USER_CONNECT ## udf diff --git a/tests/suites/0_stateless/18_rbac/18_0007_privilege_access.result b/tests/suites/0_stateless/18_rbac/18_0007_privilege_access.result index fd9a369f184f9..d1f242be62efc 100644 --- a/tests/suites/0_stateless/18_rbac/18_0007_privilege_access.result +++ b/tests/suites/0_stateless/18_rbac/18_0007_privilege_access.result @@ -101,7 +101,7 @@ Error: APIError: QueryFailed: [1063]Permission denied: privilege READ is require Error: APIError: QueryFailed: [1063]Permission denied: No privilege on database root_db for user b. Error: APIError: QueryFailed: [1063]Permission denied: No privilege on table root_table for user b. Error: APIError: QueryFailed: [1063]Permission denied: No privilege on table root_table for user b. -1 1 374 +1 1 Error: APIError: QueryFailed: [1063]Permission denied: privilege [Select] is required on 'default'.'default'.'t1' for user 'b'@'%' with roles [public] Error: APIError: QueryFailed: [1063]Permission denied: privilege [Read] is required on STAGE s3 for user 'b'@'%' with roles [public]. Note: Please ensure that your current role have the appropriate permissions to create a new Warehouse|Database|Table|UDF|Stage. Error: APIError: QueryFailed: [1063]Permission denied: privilege [Select] is required on 'default'.'default'.'t' for user 'b'@'%' with roles [public] diff --git a/tests/suites/0_stateless/18_rbac/18_0007_privilege_access.sh b/tests/suites/0_stateless/18_rbac/18_0007_privilege_access.sh index ebbc772282056..f1bcbde654d34 100755 --- a/tests/suites/0_stateless/18_rbac/18_0007_privilege_access.sh +++ b/tests/suites/0_stateless/18_rbac/18_0007_privilege_access.sh @@ -236,7 +236,7 @@ echo "grant insert, delete on default.t to b" | $BENDSQL_CLIENT_CONNECT echo "grant select on system.* to b" | $BENDSQL_CLIENT_CONNECT echo "create stage s3;" | $BENDSQL_CLIENT_CONNECT -echo "copy into '@s3/a b' from (select 2);" | $BENDSQL_CLIENT_CONNECT | $RM_UUID +echo "copy into '@s3/a b' from (select 2);" | $BENDSQL_CLIENT_CONNECT | $RM_UUID | cut -f1-2 # need err echo "insert into t select * from t1" | $USER_B_CONNECT diff --git a/tests/suites/0_stateless/20+_others/20_0015_compact_hook_stas_issue_13947.result b/tests/suites/0_stateless/20+_others/20_0015_compact_hook_stas_issue_13947.result index 6887d3cff3d73..e6922df163a3b 100644 --- a/tests/suites/0_stateless/20+_others/20_0015_compact_hook_stas_issue_13947.result +++ b/tests/suites/0_stateless/20+_others/20_0015_compact_hook_stas_issue_13947.result @@ -1,6 +1,6 @@ 1 1 -2 10 399 +2 10 expects .stats.write_progress.rows be 2 expects .error be null 2 diff --git a/tests/suites/0_stateless/20+_others/20_0015_compact_hook_stas_issue_13947.sh b/tests/suites/0_stateless/20+_others/20_0015_compact_hook_stas_issue_13947.sh index a4f1a39acbdf2..929c6eeda270c 100755 --- a/tests/suites/0_stateless/20+_others/20_0015_compact_hook_stas_issue_13947.sh +++ b/tests/suites/0_stateless/20+_others/20_0015_compact_hook_stas_issue_13947.sh @@ -11,9 +11,10 @@ create or replace stage test_stage; create or replace table tmp(id int); insert into tmp values(1); insert into tmp values(2); -copy into @test_stage from (select * from tmp); EOF +echo "copy into @test_stage from (select * from i13947.tmp)" | $BENDSQL_CLIENT_CONNECT | $RM_UUID | cut -f1-2 + # It is not convenient to extract the .stats.write_progress.rows from the output of bendsql, # thus, curl is used. To prevent the immature result returned by curl(which will not poll the result until the query is finished), diff --git a/tests/suites/1_stateful/00_stage/00_0001_copy_into_stage.result b/tests/suites/1_stateful/00_stage/00_0001_copy_into_stage.result index b4beef56607e2..aee7d3c3f0d70 100644 --- a/tests/suites/1_stateful/00_stage/00_0001_copy_into_stage.result +++ b/tests/suites/1_stateful/00_stage/00_0001_copy_into_stage.result @@ -8,7 +8,7 @@ 2 2 2 -20 160 160 -20 530 818 +20 160 +20 530 2 -20 160 160 +20 160 diff --git a/tests/suites/1_stateful/00_stage/00_0001_copy_into_stage.sh b/tests/suites/1_stateful/00_stage/00_0001_copy_into_stage.sh index 2bdcece326be8..8bc82ed17536a 100755 --- a/tests/suites/1_stateful/00_stage/00_0001_copy_into_stage.sh +++ b/tests/suites/1_stateful/00_stage/00_0001_copy_into_stage.sh @@ -18,12 +18,12 @@ for i in `seq 1 10`;do done -echo "copy into @s2 from test_table FILE_FORMAT = (type = CSV);" | $BENDSQL_CLIENT_CONNECT -echo "copy into @s2 from (select name, age, id from test_table limit 100) FILE_FORMAT = (type = 'PARQUET');" | $BENDSQL_CLIENT_CONNECT +echo "copy into @s2 from test_table FILE_FORMAT = (type = CSV);" | $BENDSQL_CLIENT_CONNECT | cut -f1-2 +echo "copy into @s2 from (select name, age, id from test_table limit 100) FILE_FORMAT = (type = 'PARQUET');" | $BENDSQL_CLIENT_CONNECT | cut -f1-2 echo "list @s2;" | $BENDSQL_CLIENT_CONNECT | wc -l | sed 's/ //g' -echo "copy into @s2 from test_table FILE_FORMAT = (type = CSV) MAX_FILE_SIZE = 10;" | $BENDSQL_CLIENT_CONNECT +echo "copy into @s2 from test_table FILE_FORMAT = (type = CSV) MAX_FILE_SIZE = 10;" | $BENDSQL_CLIENT_CONNECT | cut -f1-2 lines=`echo "list @s2;" | $BENDSQL_CLIENT_CONNECT | wc -l`