-
Notifications
You must be signed in to change notification settings - Fork 594
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into yufan/dashboard-frontend
- Loading branch information
Showing
253 changed files
with
4,597 additions
and
1,820 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
backwards-compat-tests/slt/kafka/upsert/deprecate_upsert.slt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
statement ok | ||
CREATE TABLE IF NOT EXISTS kafka_table | ||
( | ||
action varchar, | ||
user_id integer, | ||
obj_id integer, | ||
name varchar, | ||
page_id integer, | ||
age integer | ||
) | ||
WITH ( | ||
connector='kafka', | ||
topic='backwards_compat_test_kafka_source', | ||
properties.bootstrap.server='localhost:29092', | ||
scan.startup.mode='earliest', | ||
) FORMAT UPSERT ENCODE JSON; |
18 changes: 18 additions & 0 deletions
18
backwards-compat-tests/slt/kafka/upsert/include_key_as.slt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
statement ok | ||
CREATE TABLE IF NOT EXISTS kafka_table | ||
( | ||
action varchar, | ||
user_id integer, | ||
obj_id integer, | ||
name varchar, | ||
page_id integer, | ||
age integer, | ||
primary key (_rw_key) | ||
) | ||
INCLUDE key as _rw_key | ||
WITH ( | ||
connector='kafka', | ||
topic='backwards_compat_test_kafka_source', | ||
properties.bootstrap.server='localhost:29092', | ||
scan.startup.mode='earliest', | ||
) FORMAT UPSERT ENCODE JSON; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Exits as soon as any line fails. | ||
set -euo pipefail | ||
|
||
source ci/scripts/common.sh | ||
|
||
# prepare environment | ||
export CONNECTOR_LIBS_PATH="./connector-node/libs" | ||
|
||
while getopts 'p:' opt; do | ||
case ${opt} in | ||
p ) | ||
profile=$OPTARG | ||
;; | ||
\? ) | ||
echo "Invalid Option: -$OPTARG" 1>&2 | ||
exit 1 | ||
;; | ||
: ) | ||
echo "Invalid option: $OPTARG requires an argument" 1>&2 | ||
;; | ||
esac | ||
done | ||
shift $((OPTIND -1)) | ||
|
||
download_and_prepare_rw "$profile" source | ||
|
||
echo "--- Download connector node package" | ||
buildkite-agent artifact download risingwave-connector.tar.gz ./ | ||
mkdir ./connector-node | ||
tar xf ./risingwave-connector.tar.gz -C ./connector-node | ||
|
||
echo "--- starting risingwave cluster" | ||
cargo make ci-start ci-sink-test | ||
sleep 1 | ||
|
||
echo "--- create cassandra table" | ||
curl https://downloads.apache.org/cassandra/4.1.3/apache-cassandra-4.1.3-bin.tar.gz --output apache-cassandra-4.1.3-bin.tar.gz | ||
tar xfvz apache-cassandra-4.1.3-bin.tar.gz | ||
cd apache-cassandra-4.1.3/bin | ||
export CQLSH_HOST=cassandra-server | ||
export CQLSH_PORT=9042 | ||
./cqlsh -e "CREATE KEYSPACE demo WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1};use demo; | ||
CREATE table demo_bhv_table(v1 int primary key,v2 smallint,v3 bigint,v4 float,v5 double,v6 text,v7 date,v8 timestamp,v9 boolean);" | ||
|
||
echo "--- testing sinks" | ||
cd ../../ | ||
sqllogictest -p 4566 -d dev './e2e_test/sink/cassandra_sink.slt' | ||
sleep 1 | ||
cd apache-cassandra-4.1.3/bin | ||
./cqlsh -e "COPY demo.demo_bhv_table TO './query_result.csv' WITH HEADER = false AND ENCODING = 'UTF-8';" | ||
|
||
if cat ./query_result.csv | awk -F "," '{ | ||
exit !($1 == 1 && $2 == 1 && $3 == 1 && $4 == 1.1 && $5 == 1.2 && $6 == "test" && $7 == "2013-01-01" && $8 == "2013-01-01 01:01:01.000+0000" && $9 == "False\r"); }'; then | ||
echo "Cassandra sink check passed" | ||
else | ||
cat ./query_result.csv | ||
echo "The output is not as expected." | ||
exit 1 | ||
fi | ||
|
||
echo "--- Kill cluster" | ||
cd ../../ | ||
cargo make ci-kill |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.