Skip to content

Commit

Permalink
test: bump sqllogictest & fix backwards-compat-test/e2e-tests (#14354)
Browse files Browse the repository at this point in the history
  • Loading branch information
xxchan authored Jan 5, 2024
1 parent 2513cba commit cb825f0
Show file tree
Hide file tree
Showing 15 changed files with 197 additions and 17 deletions.
2 changes: 1 addition & 1 deletion Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
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

statement ok
flush;

include ../nexmark/test_mv_result.slt.part

include ../nexmark/drop_views.slt.part
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,15 @@ 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
flush;

include ../tpch/q1.slt.part
include ../tpch/q2.slt.part
include ../tpch/q3.slt.part
Expand Down
4 changes: 2 additions & 2 deletions ci/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ 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 \
[email protected] \
sqllogictest-bin@0.18.0 \
&& cargo install sccache \
sqllogictest-bin@0.19.1 \
sccache@0.7.4 \
&& cargo cache -a \
&& rm -rf "/root/.cargo/registry/index" \
&& rm -rf "/root/.cargo/registry/cache" \
Expand Down
2 changes: 1 addition & 1 deletion ci/build-ci-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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_1

export BUILD_TAG="public.ecr.aws/x5u3w5h6/rw-build-env:${BUILD_ENV_VERSION}"

Expand Down
10 changes: 5 additions & 5 deletions ci/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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_1
depends_on:
- mysql
- db
Expand All @@ -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_1
depends_on:
- mysql
- db
Expand All @@ -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_1
volumes:
- ..:/risingwave

ci-flamegraph-env:
image: public.ecr.aws/x5u3w5h6/rw-build-env:v20231226
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.
Expand All @@ -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_1
depends_on:
db:
condition: service_healthy
Expand Down
9 changes: 3 additions & 6 deletions e2e_test/batch/duckdb/all.slt.part
Original file line number Diff line number Diff line change
@@ -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
1 change: 0 additions & 1 deletion e2e_test/batch/local_mode.slt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion e2e_test/extended_mode/type.slt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Original file line number Diff line number Diff line change
@@ -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;

0 comments on commit cb825f0

Please sign in to comment.