From 8a7e2fa465f847fc5d910098eeb918b1747f7cb7 Mon Sep 17 00:00:00 2001 From: xxchan Date: Thu, 4 Jan 2024 12:09:58 +0800 Subject: [PATCH 01/12] test: IGNORE --- .../slt/nexmark-backwards-compat/validate_restart.slt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backwards-compat-tests/slt/nexmark-backwards-compat/validate_restart.slt b/backwards-compat-tests/slt/nexmark-backwards-compat/validate_restart.slt index 093f88f4fdbbe..baec94d87fe7d 100644 --- a/backwards-compat-tests/slt/nexmark-backwards-compat/validate_restart.slt +++ b/backwards-compat-tests/slt/nexmark-backwards-compat/validate_restart.slt @@ -4,6 +4,10 @@ include ./delete.slt.part include ../nexmark/insert_person.slt.part include ../nexmark/insert_auction.slt.part include ../nexmark/insert_bid.slt.part + +statement ok +flush; + include ../nexmark/test_mv_result.slt.part include ../nexmark/drop_views.slt.part From 65da40618eef1df89a2b539ddfce85f99fa8fd70 Mon Sep 17 00:00:00 2001 From: xxchan Date: Thu, 4 Jan 2024 13:00:33 +0800 Subject: [PATCH 02/12] bump sqlloogictest --- Makefile.toml | 2 +- ci/Dockerfile | 2 +- ci/build-ci-image.sh | 2 +- ci/docker-compose.yml | 10 +++++----- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Makefile.toml b/Makefile.toml index 9aec344d74d1f..347f2234e5fda 100644 --- a/Makefile.toml +++ b/Makefile.toml @@ -1332,7 +1332,7 @@ echo "All processes has exited." [tasks.slt] category = "RiseDev - SQLLogicTest" -install_crate = { version = "0.18.0", crate_name = "sqllogictest-bin", binary = "sqllogictest", test_arg = [ +install_crate = { version = "0.19.1", crate_name = "sqllogictest-bin", binary = "sqllogictest", test_arg = [ "--help", ], install_command = "binstall" } dependencies = ["check-risedev-env-file"] diff --git a/ci/Dockerfile b/ci/Dockerfile index 427e6d68dc116..f554aba206e8d 100644 --- a/ci/Dockerfile +++ b/ci/Dockerfile @@ -48,7 +48,7 @@ ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse RUN curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash RUN cargo binstall -y --no-symlinks cargo-llvm-cov cargo-nextest cargo-hakari cargo-sort cargo-cache cargo-audit \ cargo-make@0.36.10 \ - sqllogictest-bin@0.18.0 \ + sqllogictest-bin@0.19.1 \ && cargo install sccache \ && cargo cache -a \ && rm -rf "/root/.cargo/registry/index" \ diff --git a/ci/build-ci-image.sh b/ci/build-ci-image.sh index 93718b1e181be..3b40df882bd3a 100755 --- a/ci/build-ci-image.sh +++ b/ci/build-ci-image.sh @@ -10,7 +10,7 @@ cat ../rust-toolchain # shellcheck disable=SC2155 # REMEMBER TO ALSO UPDATE ci/docker-compose.yml -export BUILD_ENV_VERSION=v20231226 +export BUILD_ENV_VERSION=v20240104 export BUILD_TAG="public.ecr.aws/x5u3w5h6/rw-build-env:${BUILD_ENV_VERSION}" diff --git a/ci/docker-compose.yml b/ci/docker-compose.yml index e4ba36d5b79a2..fcb5febf767b7 100644 --- a/ci/docker-compose.yml +++ b/ci/docker-compose.yml @@ -71,7 +71,7 @@ services: retries: 5 source-test-env: - image: public.ecr.aws/x5u3w5h6/rw-build-env:v20231226 + image: public.ecr.aws/x5u3w5h6/rw-build-env:v20240104 depends_on: - mysql - db @@ -81,7 +81,7 @@ services: - ..:/risingwave sink-test-env: - image: public.ecr.aws/x5u3w5h6/rw-build-env:v20231226 + image: public.ecr.aws/x5u3w5h6/rw-build-env:v20240104 depends_on: - mysql - db @@ -93,12 +93,12 @@ services: - ..:/risingwave rw-build-env: - image: public.ecr.aws/x5u3w5h6/rw-build-env:v20231226 + image: public.ecr.aws/x5u3w5h6/rw-build-env:v20240104 volumes: - ..:/risingwave ci-flamegraph-env: - image: public.ecr.aws/x5u3w5h6/rw-build-env:v20231226 + image: public.ecr.aws/x5u3w5h6/rw-build-env:v20240104 # NOTE(kwannoel): This is used in order to permit # syscalls for `nperf` (perf_event_open), # so it can do CPU profiling. @@ -109,7 +109,7 @@ services: - ..:/risingwave regress-test-env: - image: public.ecr.aws/x5u3w5h6/rw-build-env:v20231226 + image: public.ecr.aws/x5u3w5h6/rw-build-env:v20240104 depends_on: db: condition: service_healthy From b1305c4447e772746b43dccf0c01868aaf9f4358 Mon Sep 17 00:00:00 2001 From: xxchan Date: Thu, 4 Jan 2024 13:16:14 +0800 Subject: [PATCH 03/12] binstall sccache --- ci/Dockerfile | 2 +- ci/build-ci-image.sh | 2 +- ci/docker-compose.yml | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ci/Dockerfile b/ci/Dockerfile index f554aba206e8d..810a3289b66a8 100644 --- a/ci/Dockerfile +++ b/ci/Dockerfile @@ -49,7 +49,7 @@ RUN curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/ca RUN cargo binstall -y --no-symlinks cargo-llvm-cov cargo-nextest cargo-hakari cargo-sort cargo-cache cargo-audit \ cargo-make@0.36.10 \ sqllogictest-bin@0.19.1 \ - && cargo install sccache \ + sccache@0.7.4 \ && cargo cache -a \ && rm -rf "/root/.cargo/registry/index" \ && rm -rf "/root/.cargo/registry/cache" \ diff --git a/ci/build-ci-image.sh b/ci/build-ci-image.sh index 3b40df882bd3a..bbdc5d7bfa9ed 100755 --- a/ci/build-ci-image.sh +++ b/ci/build-ci-image.sh @@ -10,7 +10,7 @@ cat ../rust-toolchain # shellcheck disable=SC2155 # REMEMBER TO ALSO UPDATE ci/docker-compose.yml -export BUILD_ENV_VERSION=v20240104 +export BUILD_ENV_VERSION=v20240104_1 export BUILD_TAG="public.ecr.aws/x5u3w5h6/rw-build-env:${BUILD_ENV_VERSION}" diff --git a/ci/docker-compose.yml b/ci/docker-compose.yml index fcb5febf767b7..0ebb9e77eeb20 100644 --- a/ci/docker-compose.yml +++ b/ci/docker-compose.yml @@ -71,7 +71,7 @@ services: retries: 5 source-test-env: - image: public.ecr.aws/x5u3w5h6/rw-build-env:v20240104 + image: public.ecr.aws/x5u3w5h6/rw-build-env:v20240104_1 depends_on: - mysql - db @@ -81,7 +81,7 @@ services: - ..:/risingwave sink-test-env: - image: public.ecr.aws/x5u3w5h6/rw-build-env:v20240104 + image: public.ecr.aws/x5u3w5h6/rw-build-env:v20240104_1 depends_on: - mysql - db @@ -93,12 +93,12 @@ services: - ..:/risingwave rw-build-env: - image: public.ecr.aws/x5u3w5h6/rw-build-env:v20240104 + image: public.ecr.aws/x5u3w5h6/rw-build-env:v20240104_1 volumes: - ..:/risingwave ci-flamegraph-env: - image: public.ecr.aws/x5u3w5h6/rw-build-env:v20240104 + image: public.ecr.aws/x5u3w5h6/rw-build-env:v20240104_1 # NOTE(kwannoel): This is used in order to permit # syscalls for `nperf` (perf_event_open), # so it can do CPU profiling. @@ -109,7 +109,7 @@ services: - ..:/risingwave regress-test-env: - image: public.ecr.aws/x5u3w5h6/rw-build-env:v20240104 + image: public.ecr.aws/x5u3w5h6/rw-build-env:v20240104_1 depends_on: db: condition: service_healthy From a7b0f279f1996c04454b4d24cdb04f7d1d45f55b Mon Sep 17 00:00:00 2001 From: xxchan Date: Thu, 4 Jan 2024 13:21:10 +0800 Subject: [PATCH 04/12] fix backwards-compat-test --- .../slt/nexmark-backwards-compat/{delete.slt => delete.slt.part} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename backwards-compat-tests/slt/nexmark-backwards-compat/{delete.slt => delete.slt.part} (100%) diff --git a/backwards-compat-tests/slt/nexmark-backwards-compat/delete.slt b/backwards-compat-tests/slt/nexmark-backwards-compat/delete.slt.part similarity index 100% rename from backwards-compat-tests/slt/nexmark-backwards-compat/delete.slt rename to backwards-compat-tests/slt/nexmark-backwards-compat/delete.slt.part From 67d3b85db3276082628714b5690a2d26587fa447 Mon Sep 17 00:00:00 2001 From: xxchan Date: Thu, 4 Jan 2024 13:35:54 +0800 Subject: [PATCH 05/12] fix tpch --- .../slt/tpch-backwards-compat/{delete.slt => delete.slt.part} | 0 .../slt/tpch-backwards-compat/{insert.slt => insert.slt.part} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename backwards-compat-tests/slt/tpch-backwards-compat/{delete.slt => delete.slt.part} (100%) rename backwards-compat-tests/slt/tpch-backwards-compat/{insert.slt => insert.slt.part} (100%) diff --git a/backwards-compat-tests/slt/tpch-backwards-compat/delete.slt b/backwards-compat-tests/slt/tpch-backwards-compat/delete.slt.part similarity index 100% rename from backwards-compat-tests/slt/tpch-backwards-compat/delete.slt rename to backwards-compat-tests/slt/tpch-backwards-compat/delete.slt.part diff --git a/backwards-compat-tests/slt/tpch-backwards-compat/insert.slt b/backwards-compat-tests/slt/tpch-backwards-compat/insert.slt.part similarity index 100% rename from backwards-compat-tests/slt/tpch-backwards-compat/insert.slt rename to backwards-compat-tests/slt/tpch-backwards-compat/insert.slt.part From 0152adc785bebc786abce41d3c412bbd30e8fbde Mon Sep 17 00:00:00 2001 From: xxchan Date: Thu, 4 Jan 2024 13:40:20 +0800 Subject: [PATCH 06/12] fix over_window --- .../rank_func/{row_number_old.part => row_number_old.slt.part} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename e2e_test/over_window/templates/rank_func/{row_number_old.part => row_number_old.slt.part} (100%) diff --git a/e2e_test/over_window/templates/rank_func/row_number_old.part b/e2e_test/over_window/templates/rank_func/row_number_old.slt.part similarity index 100% rename from e2e_test/over_window/templates/rank_func/row_number_old.part rename to e2e_test/over_window/templates/rank_func/row_number_old.slt.part From a65b52f38721bfb1ffb5084a6fde9b06f1b952d3 Mon Sep 17 00:00:00 2001 From: xxchan Date: Thu, 4 Jan 2024 13:55:12 +0800 Subject: [PATCH 07/12] try adding another flush ?? --- .../slt/nexmark-backwards-compat/validate_restart.slt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backwards-compat-tests/slt/nexmark-backwards-compat/validate_restart.slt b/backwards-compat-tests/slt/nexmark-backwards-compat/validate_restart.slt index baec94d87fe7d..7a0aede6e2236 100644 --- a/backwards-compat-tests/slt/nexmark-backwards-compat/validate_restart.slt +++ b/backwards-compat-tests/slt/nexmark-backwards-compat/validate_restart.slt @@ -1,6 +1,10 @@ include ../nexmark/test_mv_result.slt.part include ./delete.slt.part + +statement ok +flush; + include ../nexmark/insert_person.slt.part include ../nexmark/insert_auction.slt.part include ../nexmark/insert_bid.slt.part From ff3c396534923432270c7b61236d5fe94636ea43 Mon Sep 17 00:00:00 2001 From: xxchan Date: Thu, 4 Jan 2024 13:59:43 +0800 Subject: [PATCH 08/12] flush tpch --- .../slt/tpch-backwards-compat/validate_restart.slt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backwards-compat-tests/slt/tpch-backwards-compat/validate_restart.slt b/backwards-compat-tests/slt/tpch-backwards-compat/validate_restart.slt index 7c7334cc222d3..2d65c62058082 100644 --- a/backwards-compat-tests/slt/tpch-backwards-compat/validate_restart.slt +++ b/backwards-compat-tests/slt/tpch-backwards-compat/validate_restart.slt @@ -24,6 +24,10 @@ include ../tpch/q22.slt.part # Test deletes and updates should work as per normal. include ./delete.slt.part include ./insert.slt.part + +statement ok +flush; + include ../tpch/q1.slt.part include ../tpch/q2.slt.part include ../tpch/q3.slt.part From f91138906525552ea05f173dceb54221c4a176ca Mon Sep 17 00:00:00 2001 From: xxchan Date: Thu, 4 Jan 2024 14:10:51 +0800 Subject: [PATCH 09/12] fix over window --- .../batch/rank_func/row_number_old.slt.part | 84 +++++++++++++++++++ .../rank_func/row_number_old.slt.part | 84 +++++++++++++++++++ 2 files changed, 168 insertions(+) create mode 100644 e2e_test/over_window/generated/batch/rank_func/row_number_old.slt.part create mode 100644 e2e_test/over_window/generated/streaming/rank_func/row_number_old.slt.part diff --git a/e2e_test/over_window/generated/batch/rank_func/row_number_old.slt.part b/e2e_test/over_window/generated/batch/rank_func/row_number_old.slt.part new file mode 100644 index 0000000000000..24f47a8116451 --- /dev/null +++ b/e2e_test/over_window/generated/batch/rank_func/row_number_old.slt.part @@ -0,0 +1,84 @@ +# This file is generated by `gen.py`. Do not edit it manually! + +statement ok +create table t ( + id int + , p1 int + , p2 int + , time int + , v1 int + , v2 int +); + +statement ok +create view v as +select + * + , row_number() over (partition by p1 order by time, id) as out1 + , row_number() over (partition by p1 order by p2 desc, id) as out2 +from t; + +statement ok +insert into t values + (100001, 100, 200, 1, 701, 805) +, (100002, 100, 200, 2, 700, 806) +, (100003, 100, 208, 2, 723, 807) +, (100004, 103, 200, 2, 702, 808); + +query II +select * from v order by id; +---- +100001 100 200 1 701 805 1 2 +100002 100 200 2 700 806 2 3 +100003 100 208 2 723 807 3 1 +100004 103 200 2 702 808 1 1 + +statement ok +insert into t values + (100005, 100, 200, 3, 717, 810) +, (100006, 105, 204, 5, 703, 828); + +query II +select * from v order by id; +---- +100001 100 200 1 701 805 1 2 +100002 100 200 2 700 806 2 3 +100003 100 208 2 723 807 3 1 +100004 103 200 2 702 808 1 1 +100005 100 200 3 717 810 4 4 +100006 105 204 5 703 828 1 1 + +statement ok +update t set v1 = 799 where id = 100002; -- value change + +statement ok +update t set p2 = 200 where id = 100003; -- partition change + +statement ok +update t set "time" = 1 where id = 100005; -- order change + +query iiiiiii +select * from v order by id; +---- +100001 100 200 1 701 805 1 1 +100002 100 200 2 799 806 3 2 +100003 100 200 2 723 807 4 3 +100004 103 200 2 702 808 1 1 +100005 100 200 1 717 810 2 4 +100006 105 204 5 703 828 1 1 + +statement ok +delete from t where time = 2; + +query iiiiiii +select * from v order by id; +---- +100001 100 200 1 701 805 1 1 +100005 100 200 1 717 810 2 2 +100006 105 204 5 703 828 1 1 + +statement ok +drop view v; + +statement ok +drop table t; diff --git a/e2e_test/over_window/generated/streaming/rank_func/row_number_old.slt.part b/e2e_test/over_window/generated/streaming/rank_func/row_number_old.slt.part new file mode 100644 index 0000000000000..39dec472b5b12 --- /dev/null +++ b/e2e_test/over_window/generated/streaming/rank_func/row_number_old.slt.part @@ -0,0 +1,84 @@ +# This file is generated by `gen.py`. Do not edit it manually! + +statement ok +create table t ( + id int + , p1 int + , p2 int + , time int + , v1 int + , v2 int +); + +statement ok +create materialized view v as +select + * + , row_number() over (partition by p1 order by time, id) as out1 + , row_number() over (partition by p1 order by p2 desc, id) as out2 +from t; + +statement ok +insert into t values + (100001, 100, 200, 1, 701, 805) +, (100002, 100, 200, 2, 700, 806) +, (100003, 100, 208, 2, 723, 807) +, (100004, 103, 200, 2, 702, 808); + +query II +select * from v order by id; +---- +100001 100 200 1 701 805 1 2 +100002 100 200 2 700 806 2 3 +100003 100 208 2 723 807 3 1 +100004 103 200 2 702 808 1 1 + +statement ok +insert into t values + (100005, 100, 200, 3, 717, 810) +, (100006, 105, 204, 5, 703, 828); + +query II +select * from v order by id; +---- +100001 100 200 1 701 805 1 2 +100002 100 200 2 700 806 2 3 +100003 100 208 2 723 807 3 1 +100004 103 200 2 702 808 1 1 +100005 100 200 3 717 810 4 4 +100006 105 204 5 703 828 1 1 + +statement ok +update t set v1 = 799 where id = 100002; -- value change + +statement ok +update t set p2 = 200 where id = 100003; -- partition change + +statement ok +update t set "time" = 1 where id = 100005; -- order change + +query iiiiiii +select * from v order by id; +---- +100001 100 200 1 701 805 1 1 +100002 100 200 2 799 806 3 2 +100003 100 200 2 723 807 4 3 +100004 103 200 2 702 808 1 1 +100005 100 200 1 717 810 2 4 +100006 105 204 5 703 828 1 1 + +statement ok +delete from t where time = 2; + +query iiiiiii +select * from v order by id; +---- +100001 100 200 1 701 805 1 1 +100005 100 200 1 717 810 2 2 +100006 105 204 5 703 828 1 1 + +statement ok +drop materialized view v; + +statement ok +drop table t; From 736b9073c13f0d334f1f04d17bbb1c6e43601c6f Mon Sep 17 00:00:00 2001 From: xxchan Date: Thu, 4 Jan 2024 14:49:36 +0800 Subject: [PATCH 10/12] fix --- e2e_test/batch/duckdb/all.slt.part | 9 +++------ e2e_test/batch/local_mode.slt | 1 - 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/e2e_test/batch/duckdb/all.slt.part b/e2e_test/batch/duckdb/all.slt.part index 68adce73dea24..ca5d1b5201c45 100644 --- a/e2e_test/batch/duckdb/all.slt.part +++ b/e2e_test/batch/duckdb/all.slt.part @@ -1,9 +1,6 @@ -include ./aggregate/*.slt.part -include ./aggregate/*/*.slt.part -include ./join/*.slt.part -include ./join/*/*.slt.part -include ./conjunction/*.slt.part -include ./conjunction/*/*.slt.part +include ./aggregate/**/*.slt.part +include ./join/**/*.slt.part +include ./conjunction/**/*.slt.part include ./limit/*.slt.part include ./select/*.slt.part include ./cte/*.slt.part diff --git a/e2e_test/batch/local_mode.slt b/e2e_test/batch/local_mode.slt index 5de337518d433..c3818989443a7 100644 --- a/e2e_test/batch/local_mode.slt +++ b/e2e_test/batch/local_mode.slt @@ -5,7 +5,6 @@ statement ok SET QUERY_MODE TO local; include ./basic/*.slt.part -include ./basic/local/*.slt.part include ./duckdb/all.slt.part include ./order/*.slt.part include ./join/*.slt.part From e02104a03602b3b3fd5edea5f5bb808d73c15aeb Mon Sep 17 00:00:00 2001 From: xxchan Date: Thu, 4 Jan 2024 15:03:13 +0800 Subject: [PATCH 11/12] try adding another flush --- .../slt/tpch-backwards-compat/validate_restart.slt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backwards-compat-tests/slt/tpch-backwards-compat/validate_restart.slt b/backwards-compat-tests/slt/tpch-backwards-compat/validate_restart.slt index 2d65c62058082..81e00f92f0ca1 100644 --- a/backwards-compat-tests/slt/tpch-backwards-compat/validate_restart.slt +++ b/backwards-compat-tests/slt/tpch-backwards-compat/validate_restart.slt @@ -23,6 +23,10 @@ include ../tpch/q22.slt.part # Test deletes and updates should work as per normal. include ./delete.slt.part + +statement ok +flush; + include ./insert.slt.part statement ok From d32ce31b20c51977f3126d446c22d7ee9dce0100 Mon Sep 17 00:00:00 2001 From: xxchan Date: Thu, 4 Jan 2024 15:43:50 +0800 Subject: [PATCH 12/12] fix --- e2e_test/extended_mode/type.slt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2e_test/extended_mode/type.slt b/e2e_test/extended_mode/type.slt index 2271ecb51c5c9..b172fcf389abc 100644 --- a/e2e_test/extended_mode/type.slt +++ b/e2e_test/extended_mode/type.slt @@ -21,7 +21,7 @@ SET RW_IMPLICIT_FLUSH TO true; include ../batch/types/boolean.slt.part include ../batch/types/cast.slt.part include ../batch/types/date.slt -include ../batch/types/intercal.slt.part +include ../batch/types/interval.slt.part include ../batch/types/number_arithmetic.slt.part include ../batch/types/temporal_arithmetic.slt.part include ../batch/types/time.slt.part