Skip to content

Commit

Permalink
Merge branch 'main' into dylan/fix_iceberg_engine_table_with_hidden_r…
Browse files Browse the repository at this point in the history
…ow_id
  • Loading branch information
chenzl25 authored Dec 25, 2024
2 parents f3108e6 + d706db6 commit 518a192
Show file tree
Hide file tree
Showing 78 changed files with 2,155 additions and 579 deletions.
56 changes: 42 additions & 14 deletions Cargo.lock

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

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,8 @@ sqlx = { git = "https://github.com/madsim-rs/sqlx.git", rev = "3efe6d0065963db2a
futures-timer = { git = "https://github.com/madsim-rs/futures-timer.git", rev = "05b33b4" }
# patch to remove preserve_order from serde_json
bson = { git = "https://github.com/risingwavelabs/bson-rust", rev = "e5175ec" }
# TODO: unpatch after PR merged https://github.com/tokio-rs/prost/pull/1210
prost-build = { git = "https://github.com/xxchan/prost.git", rev = "0eb1c7b09976cf6b5231e4b8d87bb5908ae6a163" }

[workspace.metadata.dylint]
libraries = [{ path = "./lints" }]
25 changes: 13 additions & 12 deletions Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -382,11 +382,7 @@ ln -s "$(pwd)/target/${RISEDEV_BUILD_TARGET_DIR}${BUILD_MODE_DIR}/risingwave" "$
[tasks.post-build-risingwave]
category = "RiseDev - Build"
description = "Copy RisingWave binaries to bin"
condition = { env_set = [
"ENABLE_BUILD_RUST",
], env_not_set = [
"USE_SYSTEM_RISINGWAVE",
] }
condition = { env_set = ["ENABLE_BUILD_RUST"], env_not_set = ["USE_SYSTEM_RISINGWAVE"] }
dependencies = [
"link-all-in-one-binaries",
"link-user-bin",
Expand Down Expand Up @@ -649,13 +645,23 @@ echo " $(tput setaf 4)source ${PREFIX_CONFIG}/psql-env$(tput sgr0)"

[tasks.psql]
category = "RiseDev - Start/Stop"
description = "Run local psql client with default connection parameters. You can pass extra arguments to psql."
description = "Run local psql client for RisingWave with default connection parameters. You can pass extra arguments to psql."
dependencies = ["check-and-load-risedev-env-file"]
script = '''
#!/usr/bin/env bash
psql -h $RISEDEV_RW_FRONTEND_LISTEN_ADDRESS -p $RISEDEV_RW_FRONTEND_PORT -U root -d dev "$@"
'''

[tasks.pgpsql]
category = "RiseDev - Start/Stop"
description = "Run local psql client for postgres with default connection parameters. You can pass extra arguments to psql."
dependencies = ["check-and-load-risedev-env-file"]
script = '''
#!/usr/bin/env bash
source "${PREFIX_CONFIG}/risedev-env"
PGHOST=$PGHOST PGPORT=$PGPORT PGUSER=$PGUSER PGDATABASE=$PGDATABASE psql "$@"
'''

[tasks.ctl]
category = "RiseDev - Start/Stop"
description = "Start RiseCtl"
Expand Down Expand Up @@ -863,11 +869,6 @@ script = """
#!/usr/bin/env bash
set -e
echo "Running Planner Test requires larger stack size, setting RUST_MIN_STACK to 8388608 (8MB) as default."
if [[ -z "${RUST_MIN_STACK}" ]]; then
export RUST_MIN_STACK=8388608
fi
cargo nextest run --workspace --exclude risingwave_simulation "$@"
"""
description = "🌟 Run unit tests"
Expand Down Expand Up @@ -1303,7 +1304,7 @@ echo If you still feel this is not enough, you may copy $(tput setaf 4)risedev$(
[tasks.ci-start]
category = "RiseDev - CI"
dependencies = ["clean-data", "pre-start-dev"]
command = "target/debug/risedev-dev" # `risedev-dev` is always built in dev profile
command = "target/debug/risedev-dev" # `risedev-dev` is always built in dev profile
env = { RISEDEV_CLEAN_START = true }
args = ["${@}"]
description = "Clean data and start a full RisingWave dev cluster using risedev-dev"
Expand Down
1 change: 0 additions & 1 deletion ci/scripts/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ export GCLOUD_DOWNLOAD_TGZ=https://rw-ci-deps-dist.s3.amazonaws.com/google-cloud
export NEXTEST_HIDE_PROGRESS_BAR=true
export RW_TELEMETRY_TYPE=test
export RW_SECRET_STORE_PRIVATE_KEY_HEX="0123456789abcdef0123456789abcdef"
export RUST_MIN_STACK=4194304

unset LANG

Expand Down
1 change: 0 additions & 1 deletion ci/scripts/e2e-source-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ risedev ci-kill
export RISINGWAVE_CI=true

echo "--- e2e, ci-kafka-plus-pubsub, legacy kafka tests"
export RUST_MIN_STACK=4194304
RUST_LOG="info,risingwave_stream=info,risingwave_batch=info,risingwave_storage=info" \
risedev ci-start ci-kafka
./e2e_test/source_legacy/basic/scripts/prepare_ci_kafka.sh
Expand Down
4 changes: 0 additions & 4 deletions ci/scripts/pr-unit-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,4 @@ set -euo pipefail

source ci/scripts/common.sh
source ci/scripts/pr.env.sh

# Set RUST_MIN_STACK to 8MB to avoid stack overflow in planner test.
# This is a Unit Test specific setting.
export RUST_MIN_STACK=8388608
./ci/scripts/run-unit-test.sh
63 changes: 63 additions & 0 deletions e2e_test/batch/catalog/information_schema.slt
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
statement ok
create table t(a int, b bigint, key int primary key);

statement ok
create view v as select * from t;

statement ok
create materialized view mv as select * from t;

query TT
select table_schema, table_name from information_schema.views where table_schema = 'public';
----
public v

query TT
select table_schema, table_name from information_schema.tables where table_schema = 'public' order by table_name;
----
public mv
public t
public v

query TTTTTTTT
select constraint_schema, constraint_name, table_schema, table_name from information_schema.table_constraints where table_schema = 'public' order by table_name;
----
public mv_pkey public mv
public t_pkey public t

query TT
select schema_name from information_schema.schemata order by schema_name;
----
information_schema
pg_catalog
public
rw_catalog

query TTTTTII
select * EXCEPT(constraint_catalog, table_catalog) from information_schema.key_column_usage where table_schema = 'public' order by table_name;
----
public mv_pkey public mv key 3 NULL
public t_pkey public t key 3 NULL

query TTTITTT
select table_schema, table_name, column_name, ordinal_position, data_type, udt_schema, udt_name from information_schema.columns where table_schema = 'public' order by table_name, ordinal_position;
----
public mv a 1 integer pg_catalog int4
public mv b 2 bigint pg_catalog int8
public mv key 3 integer pg_catalog int4
public t a 1 integer pg_catalog int4
public t b 2 bigint pg_catalog int8
public t key 3 integer pg_catalog int4
public v a 1 integer pg_catalog int4
public v b 2 bigint pg_catalog int8
public v key 3 integer pg_catalog int4


statement ok
drop materialized view mv;

statement ok
drop view v;

statement ok
drop table t;
30 changes: 15 additions & 15 deletions e2e_test/batch/catalog/pg_class.slt.part
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@ query ITIT
SELECT oid,relname,relowner,relkind FROM pg_catalog.pg_class ORDER BY oid limit 15;
----
2147478647 columns 1 v
2147478648 schemata 1 v
2147478649 table_constraints 1 v
2147478650 tables 1 v
2147478651 views 1 v
2147478652 pg_am 1 v
2147478653 pg_attrdef 1 v
2147478654 pg_attribute 1 v
2147478655 pg_auth_members 1 v
2147478656 pg_cast 1 r
2147478657 pg_class 1 v
2147478658 pg_collation 1 v
2147478659 pg_constraint 1 r
2147478660 pg_conversion 1 v
2147478661 pg_database 1 v
2147478648 key_column_usage 1 v
2147478649 schemata 1 v
2147478650 table_constraints 1 v
2147478651 tables 1 v
2147478652 views 1 v
2147478653 pg_am 1 v
2147478654 pg_attrdef 1 v
2147478655 pg_attribute 1 v
2147478656 pg_auth_members 1 v
2147478657 pg_cast 1 r
2147478658 pg_class 1 v
2147478659 pg_collation 1 v
2147478660 pg_constraint 1 r
2147478661 pg_conversion 1 v

query ITIT
SELECT oid,relname,relowner,relkind FROM pg_catalog.pg_class WHERE oid = 'pg_namespace'::regclass;
----
2147478672 pg_namespace 1 v
2147478673 pg_namespace 1 v
Loading

0 comments on commit 518a192

Please sign in to comment.