Skip to content

Commit

Permalink
Merge branch 'main' into eric/remove_connector_node
Browse files Browse the repository at this point in the history
  • Loading branch information
fuyufjh authored Nov 10, 2023
2 parents d7c57cb + b8b812d commit adf17b8
Show file tree
Hide file tree
Showing 43 changed files with 267 additions and 184 deletions.
14 changes: 8 additions & 6 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ arrow-buffer = "48"
arrow-flight = "48"
arrow-select = "48"
arrow-ord = "48"
thiserror-ext = "0.0.1"
thiserror-ext = "0.0.5"
tikv-jemalloc-ctl = { git = "https://github.com/risingwavelabs/jemallocator.git", rev = "64a2d9" }
tikv-jemallocator = { git = "https://github.com/risingwavelabs/jemallocator.git", features = [
"profiling",
Expand Down
2 changes: 1 addition & 1 deletion Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1333,7 +1333,7 @@ echo "All processes has exited."

[tasks.slt]
category = "RiseDev - SQLLogicTest"
install_crate = { version = "0.17.2", crate_name = "sqllogictest-bin", binary = "sqllogictest", test_arg = [
install_crate = { version = "0.18.0", crate_name = "sqllogictest-bin", binary = "sqllogictest", test_arg = [
"--help",
], install_command = "binstall" }
dependencies = ["check-risedev-env-file"]
Expand Down
2 changes: 1 addition & 1 deletion ci/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
[email protected] \
sqllogictest-bin@0.17.2 \
sqllogictest-bin@0.18.0 \
&& cargo install sccache \
&& cargo cache -a \
&& rm -rf "/root/.cargo/registry/index" \
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 @@ -9,7 +9,7 @@ cd "$DIR"
cat ../rust-toolchain
# shellcheck disable=SC2155

export BUILD_ENV_VERSION=v20231101
export BUILD_ENV_VERSION=v20231109

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:v20231101
image: public.ecr.aws/x5u3w5h6/rw-build-env:v20231109
depends_on:
- mysql
- db
Expand All @@ -81,7 +81,7 @@ services:
- ..:/risingwave

sink-test-env:
image: public.ecr.aws/x5u3w5h6/rw-build-env:v20231101
image: public.ecr.aws/x5u3w5h6/rw-build-env:v20231109
depends_on:
- mysql
- db
Expand All @@ -93,12 +93,12 @@ services:
- ..:/risingwave

rw-build-env:
image: public.ecr.aws/x5u3w5h6/rw-build-env:v20231101
image: public.ecr.aws/x5u3w5h6/rw-build-env:v20231109
volumes:
- ..:/risingwave

ci-flamegraph-env:
image: public.ecr.aws/x5u3w5h6/rw-build-env:v20231101
image: public.ecr.aws/x5u3w5h6/rw-build-env:v20231109
# 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:v20231101
image: public.ecr.aws/x5u3w5h6/rw-build-env:v20231109
depends_on:
db:
condition: service_healthy
Expand Down
8 changes: 8 additions & 0 deletions ci/scripts/run-e2e-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,14 @@ sqllogictest -p 4566 -d dev './e2e_test/generated/**/*.slt' --junit "generated-$
echo "--- Kill cluster"
cluster_stop

echo "--- e2e, $mode, error ui"
RUST_LOG="info,risingwave_stream=info,risingwave_batch=info,risingwave_storage=info" \
cluster_start
sqllogictest -p 4566 -d dev './e2e_test/error_ui/**/*.slt'

echo "--- Kill cluster"
cluster_stop

echo "--- e2e, $mode, extended query"
RUST_LOG="info,risingwave_stream=info,risingwave_batch=info,risingwave_storage=info" \
cluster_start
Expand Down
4 changes: 2 additions & 2 deletions e2e_test/batch/aggregate/sum.slt.part
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ select sum(d) from t;
statement ok
insert into t values (9000000000000000000000000000);

statement error Expr error: Numeric out of range
statement error Numeric out of range
select sum(d) from t;

statement ok
drop table t;
drop table t;
2 changes: 1 addition & 1 deletion e2e_test/batch/basic/dml.slt.part
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ select * from t order by v1;
1 1 aa
3 2 bb

statement error QueryError: Bind error: update modifying the PK column is unsupported
statement error update modifying the PK column is unsupported
update t set (v3, v2) = (v3||v3, v1+v2);

statement ok
Expand Down
12 changes: 6 additions & 6 deletions e2e_test/batch/functions/pow.slt.part
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ select pow(100000, 0);
statement error underflow
select pow(100000, -200000000000000);

statement error QueryError: Expr error: Numeric out of range
statement error Numeric out of range
select pow(100000, 200000000000000);


statement error QueryError: Expr error: Numeric out of range
statement error Numeric out of range
select pow(-100000, 200000000000001);

query R
Expand Down Expand Up @@ -101,11 +101,11 @@ select 100000 ^ 0;
statement error underflow
select 100000 ^ -200000000000000;

statement error QueryError: Expr error: Numeric out of range
statement error Numeric out of range
select 100000 ^ 200000000000000;


statement error QueryError: Expr error: Numeric out of range
statement error Numeric out of range
select -100000 ^ 200000000000001;

query RRRR
Expand Down Expand Up @@ -231,10 +231,10 @@ select exp(2::smallint)
----
7.38905609893065

statement error QueryError: Expr error: Numeric out of range: overflow
statement error Numeric out of range: overflow
select exp(10000000);

statement error QueryError: Expr error: Numeric out of range: underflow
statement error Numeric out of range: underflow
select exp(-10000000);

query TRR
Expand Down
3 changes: 1 addition & 2 deletions e2e_test/ddl/invalid_operation.slt
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,6 @@ SELECT * from msrc limit 0;
# FIXME: improve the error message
query error not found
SELECT * from sink limit 0;
----

query I
SELECT * from v limit 0;
Expand All @@ -264,7 +263,7 @@ SELECT * from v limit 0;
statement ok
insert into t values (1);

statement error QueryError: Bind error: update modifying the PK column is unsupported
statement error update modifying the PK column is unsupported
update t set v = 2;

statement ok
Expand Down
8 changes: 4 additions & 4 deletions e2e_test/ddl/table/generated_columns.slt.part
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ select * from t1;
0 1 2 2.02
1 2 3 3.02

statement error QueryError: Bind error: update modifying the generated column is unsupported
statement error update modifying the generated column is unsupported
update t1 set v1 = 1;

statement ok
Expand Down Expand Up @@ -140,7 +140,7 @@ statement ok
drop source t4;

# create a table with generated column now
statement error QueryError: Bind error: failed to bind expression: now()
statement error failed to bind expression: now()
CREATE TABLE t (v INT, t timestamptz as now()) WITH (
connector = 'datagen',
fields.v.kind = 'sequence',
Expand All @@ -151,9 +151,9 @@ CREATE TABLE t (v INT, t timestamptz as now()) WITH (
) FORMAT PLAIN ENCODE JSON;

# create a table with impure generated column as pk.
statement error QueryError: Bind error: Generated columns with impure expressions should not be part of the primary key. Here column "v2" is defined as part of the primary key.
statement error Generated columns with impure expressions should not be part of the primary key. Here column "v2" is defined as part of the primary key.
CREATE TABLE t (
v1 INT,
v2 timestamptz AS proctime(),
PRIMARY KEY (v1, v2)
);
);
12 changes: 12 additions & 0 deletions e2e_test/error_ui/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# User Interface Test for Error Reporting

The test cases in this directory act as snapshot tests for the error reporting, to ensure that the UI does not change unexpectedly.

When you find the tests in this directory failing...

- First, ensure that the changes to the error messages are expected and make them look better.
- Then, update the test cases by running:
```bash
./risedev slt './e2e_test/error_ui/**/*.slt' --override
```
Please note that the minimum required version of `sqllogictest` is 0.18 or higher.
41 changes: 41 additions & 0 deletions e2e_test/error_ui/main.slt
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
statement error
create function int_42() returns int as int_42 using link 'localhost:8815';
----
db error: ERROR: QueryError

Caused by these errors (recent errors listed first):
1: failed to connect to UDF service
2: transport error
3: error trying to connect
4: invalid URL, scheme is missing


statement error
alter system set not_exist_key to value;
----
db error: ERROR: QueryError

Caused by this error:
1: internal error: SystemParams error: unrecognized system param "not_exist_key"


query error
select v1 + v2 = v3;
----
db error: ERROR: QueryError

Caused by this error:
1: Bind error: failed to bind expression: v1 + v2 = v3

Caused by:
Item not found: Invalid column: v1


query error
select 1/0;
----
db error: ERROR: QueryError

Caused by these errors (recent errors listed first):
1: Expr error
2: Division by zero
2 changes: 1 addition & 1 deletion e2e_test/sink/append_only_sink.slt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ create sink invalid_sink_type from t with (connector = 'blackhole', type = 'inva
statement error `force_append_only` must be true or false
create sink invalid_force_append_only from t with (connector = 'blackhole', force_append_only = 'invalid');

statement error db error: ERROR: QueryError: Sink error: config error: unsupported sink type invalid
statement error unsupported sink type invalid
create sink invalid_connector from t with (connector = 'invalid');

statement ok
Expand Down
2 changes: 1 addition & 1 deletion e2e_test/sink/kafka/avro.slt
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ create sink sink_err from into_kafka with (
format upsert encode avro (
schema.registry = 'http://message_queue:8081');

statement error encode extra_column error: field not in avro
statement error field not in avro
create sink sink_err as select 1 as extra_column, * from into_kafka with (
connector = 'kafka',
topic = 'test-rw-sink-upsert-avro',
Expand Down
2 changes: 1 addition & 1 deletion e2e_test/sink/kafka/protobuf.slt
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ format plain encode protobuf (
schema.location = 'file:///risingwave/proto-recursiv',
message = 'recursive.AllTypes');

statement error encode extra_column error: field not in proto
statement error field not in proto
create sink sink_err as select 1 as extra_column with (
connector = 'kafka',
topic = 'test-rw-sink-append-only-protobuf',
Expand Down
4 changes: 2 additions & 2 deletions e2e_test/source/basic/datagen.slt
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,9 @@ statement ok
drop table s1;

# Do NOT allow With clause to contain a comma only.
statement error QueryError: sql parser error: Expected identifier.*
statement error Expected identifier.*
create table s1 (v1 int) with (,) FORMAT PLAIN ENCODE JSON;

# Do NOT allow an empty With clause.
statement error QueryError: sql parser error: Expected identifier.*
statement error Expected identifier.*
create table s1 (v1 int) with () FORMAT PLAIN ENCODE JSON;
4 changes: 2 additions & 2 deletions e2e_test/source/basic/ddl.slt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ create source invalid_startup_mode (
) FORMAT PLAIN ENCODE JSON;

# TODO: Better to refine the error message.
statement error internal error: invalid digit found in string
statement error invalid digit found in string
create source invalid_startup_timestamp (
column1 varchar
) with (
Expand All @@ -28,7 +28,7 @@ create source invalid_startup_timestamp (
properties.bootstrap.server = 'message_queue:29092'
) FORMAT PLAIN ENCODE JSON;

statement error db error: ERROR: QueryError: Protocol error: Schema definition is required, either from SQL or schema registry.
statement error Schema definition is required, either from SQL or schema registry.
create source invalid_schema_definition
with (
connector = 'kafka',
Expand Down
4 changes: 2 additions & 2 deletions e2e_test/source/basic/old_row_format_syntax/datagen.slt
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,9 @@ statement ok
drop table s1;

# Do NOT allow With clause to contain a comma only.
statement error QueryError: sql parser error: Expected identifier.*
statement error Expected identifier.*
create table s1 (v1 int) with (,) ROW FORMAT JSON;

# Do NOT allow an empty With clause.
statement error QueryError: sql parser error: Expected identifier.*
statement error Expected identifier.*
create table s1 (v1 int) with () ROW FORMAT JSON;
4 changes: 2 additions & 2 deletions e2e_test/source/basic/old_row_format_syntax/ddl.slt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ create source invalid_startup_mode (
) ROW FORMAT JSON;

# TODO: Better to refine the error message.
statement error internal error: invalid digit found in string
statement error invalid digit found in string
create source invalid_startup_timestamp (
column1 varchar
) with (
Expand All @@ -28,7 +28,7 @@ create source invalid_startup_timestamp (
properties.bootstrap.server = 'message_queue:29092'
) ROW FORMAT JSON;

statement error db error: ERROR: QueryError: Protocol error: Schema definition is required, either from SQL or schema registry.
statement error Schema definition is required, either from SQL or schema registry.
create source invalid_schema_definition
with (
connector = 'kafka',
Expand Down
Loading

0 comments on commit adf17b8

Please sign in to comment.