Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into peng/remove-pu-all
Browse files Browse the repository at this point in the history
  • Loading branch information
shanicky committed Jun 25, 2024
2 parents b08dbcc + da9bd03 commit 41f7d21
Show file tree
Hide file tree
Showing 62 changed files with 1,859 additions and 758 deletions.
11 changes: 5 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1294,7 +1294,7 @@ echo "All processes has exited."

[tasks.slt]
category = "RiseDev - Test - SQLLogicTest"
install_crate = { version = "0.20.1", crate_name = "sqllogictest-bin", binary = "sqllogictest", test_arg = [
install_crate = { min_version = "0.20.6", crate_name = "sqllogictest-bin", binary = "sqllogictest", test_arg = [
"--help",
], install_command = "binstall" }
dependencies = ["check-and-load-risedev-env-file"]
Expand All @@ -1308,6 +1308,7 @@ SLT_PORT = "${RISEDEV_RW_FRONTEND_PORT}"
SLT_DB = "dev"
PATH = "${PWD}/e2e_test/commands:${PATH}"
RUST_BACKTRACE = "0" # slt backtrace is useless
RUST_LOG = "sqllogictest=warn,sqllogictest::system_command=info"

[tasks.slt-clean]
category = "RiseDev - Test - SQLLogicTest"
Expand Down
4 changes: 2 additions & 2 deletions ci/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,14 @@ 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] \
[email protected].4 \
[email protected].6 \
[email protected] \
&& cargo cache -a \
&& rm -rf "/root/.cargo/registry/index" \
&& rm -rf "/root/.cargo/registry/cache" \
&& rm -rf "/root/.cargo/git/db"
RUN cargo install [email protected] [email protected]
RUN cargo uninstall cargo-binstall cargo-cache
RUN cargo uninstall cargo-cache

# install risedev
COPY <<EOF /root/.cargo/bin/risedev
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=v20240606
export BUILD_ENV_VERSION=v20240624

export BUILD_TAG="public.ecr.aws/w1p7b4n3/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/w1p7b4n3/rw-build-env:v20240606
image: public.ecr.aws/w1p7b4n3/rw-build-env:v20240624
depends_on:
- mysql
- db
Expand All @@ -84,7 +84,7 @@ services:
- ..:/risingwave

sink-test-env:
image: public.ecr.aws/w1p7b4n3/rw-build-env:v20240606
image: public.ecr.aws/w1p7b4n3/rw-build-env:v20240624
depends_on:
- mysql
- db
Expand All @@ -107,12 +107,12 @@ services:


rw-build-env:
image: public.ecr.aws/w1p7b4n3/rw-build-env:v20240606
image: public.ecr.aws/w1p7b4n3/rw-build-env:v20240624
volumes:
- ..:/risingwave

ci-flamegraph-env:
image: public.ecr.aws/w1p7b4n3/rw-build-env:v20240606
image: public.ecr.aws/w1p7b4n3/rw-build-env:v20240624
# NOTE(kwannoel): This is used in order to permit
# syscalls for `nperf` (perf_event_open),
# so it can do CPU profiling.
Expand All @@ -123,7 +123,7 @@ services:
- ..:/risingwave

regress-test-env:
image: public.ecr.aws/w1p7b4n3/rw-build-env:v20240606
image: public.ecr.aws/w1p7b4n3/rw-build-env:v20240624
depends_on:
db:
condition: service_healthy
Expand Down
8 changes: 4 additions & 4 deletions ci/scripts/e2e-test-parallel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,21 +38,21 @@ RUST_LOG="info,risingwave_stream=info,risingwave_batch=info,risingwave_storage=i
echo "--- e2e, ci-3streaming-2serving-3fe, streaming"
RUST_LOG=$RUST_LOG \
risedev ci-start ci-3streaming-2serving-3fe
sqllogictest "${host_args[@]}" -d dev './e2e_test/streaming/**/*.slt' -j 16 --junit "parallel-streaming-${profile}"
sqllogictest "${host_args[@]}" -d dev './e2e_test/streaming/**/*.slt' -j 16 --junit "parallel-streaming-${profile}" --label "parallel"

kill_cluster

echo "--- e2e, ci-3streaming-2serving-3fe, batch"
RUST_LOG=$RUST_LOG \
risedev ci-start ci-3streaming-2serving-3fe
sqllogictest "${host_args[@]}" -d dev './e2e_test/ddl/**/*.slt' --junit "parallel-batch-ddl-${profile}"
sqllogictest "${host_args[@]}" -d dev './e2e_test/visibility_mode/*.slt' -j 16 --junit "parallel-batch-${profile}"
sqllogictest "${host_args[@]}" -d dev './e2e_test/ddl/**/*.slt' --junit "parallel-batch-ddl-${profile}" --label "parallel"
sqllogictest "${host_args[@]}" -d dev './e2e_test/visibility_mode/*.slt' -j 16 --junit "parallel-batch-${profile}" --label "parallel"

kill_cluster

echo "--- e2e, ci-3streaming-2serving-3fe, generated"
RUST_LOG=$RUST_LOG \
risedev ci-start ci-3streaming-2serving-3fe
sqllogictest "${host_args[@]}" -d dev './e2e_test/generated/**/*.slt' -j 16 --junit "parallel-generated-${profile}"
sqllogictest "${host_args[@]}" -d dev './e2e_test/generated/**/*.slt' -j 16 --junit "parallel-generated-${profile}" --label "parallel"

kill_cluster
29 changes: 29 additions & 0 deletions e2e_test/batch/subquery/lateral_subquery.slt.part
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,32 @@ drop table all_sales;
statement ok
drop table salesperson;

statement ok
CREATE TABLE r(ts TIMESTAMPTZ, src_id int, dev_id int);

statement ok
INSERT INTO r VALUES
('2024-06-20T19:00:22Z'::TIMESTAMPTZ, 2, 2),
('2024-06-20T19:00:22Z'::TIMESTAMPTZ, 1, 3),
('2024-06-20T19:00:23Z'::TIMESTAMPTZ, 1, 2),
('2024-06-20T19:00:24Z'::TIMESTAMPTZ, 2, 1),
('2024-06-20T19:00:24Z'::TIMESTAMPTZ, 1, 2),
('2024-06-20T19:00:25Z'::TIMESTAMPTZ, 2, 1);

query TII rowsort
SELECT e.ts AS e_ts, d.*
FROM (
SELECT '2024-06-20T19:01:00Z'::TIMESTAMPTZ ts, 1::INT AS src_id) e
JOIN LATERAL
(
SELECT DISTINCT ON(src_id, dev_id) *
FROM r
WHERE r.src_id = e.src_id AND r.ts <= e.ts
ORDER BY src_id, dev_id, ts DESC
)d on true;
----
2024-06-20 19:01:00+00:00 2024-06-20 19:00:22+00:00 1 3
2024-06-20 19:01:00+00:00 2024-06-20 19:00:24+00:00 1 2

statement ok
DROP TABLE r CASCADE;
133 changes: 0 additions & 133 deletions e2e_test/source/basic/inlcude_key_as.slt

This file was deleted.

32 changes: 32 additions & 0 deletions e2e_test/source/basic/ttl_table_with_con.slt
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
statement ok
create table t (v1 int, v2 varchar) APPEND ONLY with (
connector = 'kafka',
topic = 'kafka_1_partition_topic',
properties.bootstrap.server = 'message_queue:29092',
scan.startup.mode = 'earliest',
retention_seconds = 5
) FORMAT PLAIN ENCODE JSON;

statement ok
flush;

# Wait enough time to ensure SourceExecutor consumes all Kafka data.
sleep 1s

query IT rowsort
select * from t
----
1 1
2 22
3 333
4 4444

statement ok
select pg_sleep(10);

query I
select * from t;
----

statement ok
drop table t;
1 change: 0 additions & 1 deletion e2e_test/source_inline/kafka/avro/name_strategy.slt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ create source s1 () with (
system ok
python3 scripts/source/schema_registry_producer.py "${RISEDEV_KAFKA_BOOTSTRAP_SERVERS}" "${RISEDEV_SCHEMA_REGISTRY_URL}" e2e_test/source_inline/kafka/avro/upsert_avro_json "topic" "avro"

# If we cannot extract key schema, use message key as varchar primary key
statement ok
CREATE TABLE t_topic ( primary key (rw_key) )
INCLUDE KEY AS rw_key
Expand Down
Loading

0 comments on commit 41f7d21

Please sign in to comment.