Skip to content

Commit b5169d0

Browse files
authored
Merge branch 'main' into wangzheng/serving_ctl
2 parents 9e603bf + 1c1354c commit b5169d0

File tree

193 files changed

+5340
-2340
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

193 files changed

+5340
-2340
lines changed

.github/workflows/connector-node-integration.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
4242
echo "--- build connector node"
4343
cd ${RISINGWAVE_ROOT}/java
44-
mvn --batch-mode --update-snapshots clean package
44+
mvn --batch-mode --update-snapshots clean package -Dno-build-rust
4545
4646
echo "--- install postgresql client"
4747
sudo apt install postgresql postgresql-contrib libpq-dev

.github/workflows/typo.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ jobs:
1010
uses: actions/checkout@v3
1111

1212
- name: Check spelling of the entire repository
13-
uses: crate-ci/typos@v1.14.12
13+
uses: crate-ci/typos@v1.15.0

.typos.toml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
[default.extend-words]
2-
indexs = "indices"
3-
Stichting = "Stichting"
4-
fo = "fo"
5-
FPR = "FPR"
2+
indexs = "indices" # Both are valid, just pick one.
3+
Stichting = "Stichting" # This is Dutch for "Foundation". From DuckDB.
4+
FPR = "FPR" # False Positive Rate
5+
inout = "inout" # This is a SQL keyword!
6+
numer = "numer" # numerator
7+
nd = "nd" # N-dimentional / 2nd
8+
steam = "stream" # You played with Steam games too much.
9+
# Some weird short variable names
610
ot = "ot"
7-
inout = "inout"
8-
numer = "numer"
9-
nd = "nd"
10-
steam = "stream"
11+
bui = "bui"
12+
13+
[default.extend-identifiers]
1114

1215
[files]
1316
extend-exclude = [

Cargo.lock

Lines changed: 10 additions & 37 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,16 @@ hashbrown = { version = "0.13.2", features = ["ahash", "inline-more", "nightly"]
7878
lto = 'off'
7979

8080
[profile.release]
81-
debug = "line-tables-only"
81+
debug = 1
8282
lto = 'thin'
8383

8484
# The profile used for CI in main branch.
8585
# This profile inherits from the release profile, but turns on some checks and assertions for us to
8686
# better catch bugs in CI.
8787
[profile.ci-release]
8888
inherits = "release"
89+
incremental = false
90+
debug = "line-tables-only"
8991
debug-assertions = true
9092
overflow-checks = true
9193

Makefile.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -910,7 +910,7 @@ if [ $# -gt 0 ]; then
910910
ARGS=("$@")
911911
912912
echo "Applying clippy --fix for $@ (including dirty and staged files)"
913-
cargo clippy ${ARGS[@]/#/--package risingwave_} ${RISINGWAVE_FEATURE_FLAGS} --fix --allow-dirty --allow-staged
913+
cargo clippy ${ARGS[@]/#/--package risingwave_} --fix --allow-dirty --allow-staged
914914
else
915915
echo "Applying clippy --fix for all targets to all files (including dirty and staged files)"
916916
echo "Tip: run $(tput setaf 4)./risedev cf {package_names}$(tput sgr0) to only check-fix those packages (e.g. frontend, meta)."
@@ -922,7 +922,7 @@ fi
922922
private = true
923923
category = "RiseDev - Check"
924924
description = "Run cargo typos-cli check"
925-
install_crate = { min_version = "1.14.8", crate_name = "typos-cli", binary = "typos", test_arg = [
925+
install_crate = { min_version = "1.15.0", crate_name = "typos-cli", binary = "typos", test_arg = [
926926
"--help",
927927
], install_command = "binstall" }
928928
script = """

ci/scripts/build-other.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ cd ..
1313

1414
echo "--- Upload Java artifacts"
1515
cp java/connector-node/assembly/target/risingwave-connector-1.0.0.tar.gz ./risingwave-connector.tar.gz
16-
cp java/udf/target/risingwave-udf-example.jar ./risingwave-udf-example.jar
16+
cp java/udf-example/target/risingwave-udf-example.jar ./risingwave-udf-example.jar
1717
buildkite-agent artifact upload ./risingwave-connector.tar.gz
1818
buildkite-agent artifact upload ./risingwave-udf-example.jar

ci/scripts/build.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,11 @@ cargo build \
5252
-p risingwave_sqlsmith \
5353
-p risingwave_compaction_test \
5454
-p risingwave_backup_cmd \
55-
-p risingwave_java_binding \
5655
-p risingwave_e2e_extended_mode_test \
5756
$RISINGWAVE_FEATURE_FLAGS \
5857
--profile "$profile"
5958

60-
# the file name suffix of artifact for risingwave_java_binding is so only for linux. It is dylib for MacOS
61-
artifacts=(risingwave sqlsmith compaction-test backup-restore risingwave_regress_test risingwave_e2e_extended_mode_test risedev-dev delete-range-test librisingwave_java_binding.so)
59+
artifacts=(risingwave sqlsmith compaction-test backup-restore risingwave_regress_test risingwave_e2e_extended_mode_test risedev-dev delete-range-test)
6260

6361
echo "--- Show link info"
6462
ldd target/"$profile"/risingwave

ci/scripts/common.sh

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -86,23 +86,3 @@ function download_and_prepare_rw() {
8686
cargo make pre-start-dev
8787
cargo make --allow-private link-all-in-one-binaries
8888
}
89-
90-
# Arguments:
91-
# $1: cargo build `profile` of the binaries
92-
function download_java_binding() {
93-
echo "--- Download java binding"
94-
if [ -z "$1" ]; then
95-
echo "download_java_binding: missing argument profile"
96-
exit 1
97-
fi
98-
99-
profile=$1
100-
101-
echo -e "\033[33mDownload artifacts\033[0m"
102-
103-
mkdir -p target/debug
104-
download-and-decompress-artifact librisingwave_java_binding.so-"$profile" target/debug
105-
mv target/debug/librisingwave_java_binding.so-"$profile" target/debug/librisingwave_java_binding.so
106-
107-
export RW_JAVA_BINDING_LIB_PATH=${PWD}/target/debug
108-
}

ci/scripts/e2e-iceberg-sink-test.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@ shift $((OPTIND -1))
2323

2424
download_and_prepare_rw "$profile" source
2525

26-
download_java_binding "$profile"
27-
28-
export RW_CONNECTOR_RPC_SINK_PAYLOAD_FORMAT=stream_chunk
29-
3026
echo "--- Download connector node package"
3127
buildkite-agent artifact download risingwave-connector.tar.gz ./
3228
mkdir ./connector-node

ci/scripts/e2e-sink-test.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,6 @@ shift $((OPTIND -1))
2323

2424
download_and_prepare_rw "$profile" source
2525

26-
download_java_binding "$profile"
27-
28-
# TODO: Switch to stream_chunk encoding once it's completed, and then remove json encoding as well as this env var.
29-
export RW_CONNECTOR_RPC_SINK_PAYLOAD_FORMAT=stream_chunk
30-
3126
# Change process number limit
3227
echo "--- os limits"
3328
ulimit -a

ci/scripts/e2e-source-test.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ shift $((OPTIND -1))
2626

2727
download_and_prepare_rw "$profile" source
2828

29-
download_java_binding "$profile"
30-
3129
echo "--- Download connector node package"
3230
buildkite-agent artifact download risingwave-connector.tar.gz ./
3331
mkdir ./connector-node

ci/scripts/java-binding-test.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,11 @@ shift $((OPTIND -1))
2323

2424
download_and_prepare_rw "$profile" source
2525

26-
download_java_binding "$profile"
27-
2826
echo "--- starting risingwave cluster"
2927
cargo make ci-start java-binding-demo
3028

3129
echo "--- Build java binding demo"
32-
cargo make build-java-binding-java
30+
cargo make build-java-binding
3331

3432
echo "--- ingest data and run java binding"
3533
cargo make ingest-data-and-run-java-binding

ci/scripts/release.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ if [[ -n "${BUILDKITE_TAG}" ]]; then
8383
gh release upload "${BUILDKITE_TAG}" risectl-"${BUILDKITE_TAG}"-x86_64-unknown-linux.tar.gz
8484

8585
echo "--- Release build and upload risingwave connector node jar asset"
86-
cd ${REPO_ROOT}/java && mvn -B package -Dmaven.test.skip=true
86+
cd ${REPO_ROOT}/java && mvn -B package -Dmaven.test.skip=true -Djava.binding.release=true
8787
cd connector-node/assembly/target && mv risingwave-connector-1.0.0.tar.gz risingwave-connector-"${BUILDKITE_TAG}".tar.gz
8888
gh release upload "${BUILDKITE_TAG}" risingwave-connector-"${BUILDKITE_TAG}".tar.gz
8989
fi

docker/Dockerfile

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,11 @@ RUN rustup self update \
3434

3535
RUN cargo fetch
3636

37-
RUN cargo build -p risingwave_cmd_all -p risingwave_java_binding --release --features "rw-static-link" && \
37+
RUN cargo build -p risingwave_cmd_all --release --features "rw-static-link" && \
3838
mkdir -p /risingwave/bin && mv /risingwave/target/release/risingwave /risingwave/bin/ && \
39-
mkdir -p /risingwave/lib && mv /risingwave/target/release/librisingwave_java_binding.so /risingwave/lib && \
40-
cargo clean
39+
mkdir -p /risingwave/lib && cargo clean
4140

42-
RUN cd /risingwave/java && mvn -B package -Dmaven.test.skip=true && \
41+
RUN cd /risingwave/java && mvn -B package -Dmaven.test.skip=true -Djava.binding.release=true && \
4342
mkdir -p /risingwave/bin/connector-node && \
4443
tar -zxvf /risingwave/java/connector-node/assembly/target/risingwave-connector-1.0.0.tar.gz -C /risingwave/bin/connector-node
4544

@@ -52,9 +51,6 @@ RUN mkdir -p /risingwave/bin/connector-node && mkdir -p /risingwave/lib
5251
COPY --from=builder /risingwave/bin/risingwave /risingwave/bin/risingwave
5352
COPY --from=builder /risingwave/bin/connector-node /risingwave/bin/connector-node
5453
COPY --from=builder /risingwave/ui /risingwave/ui
55-
COPY --from=builder /risingwave/lib/librisingwave_java_binding.so /risingwave/lib/librisingwave_java_binding.so
56-
# Set java.library.path env to /risingwave/lib
57-
ENV RW_JAVA_BINDING_LIB_PATH /risingwave/lib
5854
# Set default playground mode to docker-playground profile
5955
ENV PLAYGROUND_PROFILE docker-playground
6056
# Set default dashboard UI to local path instead of github proxy

docker/Dockerfile.hdfs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,11 @@ ARG JAVA_HOME_PATH
3939
ENV JAVA_HOME ${JAVA_HOME_PATH}
4040
ENV LD_LIBRARY_PATH ${JAVA_HOME_PATH}/lib/server:${LD_LIBRARY_PATH}
4141

42-
RUN cargo build -p risingwave_cmd_all -p risingwave_java_binding --release --features "static-link static-log-level" && \
42+
RUN cargo build -p risingwave_cmd_all --release --features "static-link static-log-level" && \
4343
mkdir -p /risingwave/bin && mv /risingwave/target/release/risingwave /risingwave/bin/ && \
44-
mkdir -p /risingwave/lib && mv /risingwave/target/release/librisingwave_java_binding.so /risingwave/lib && \
45-
cargo clean
44+
mkdir -p /risingwave/lib && cargo clean
4645

47-
RUN cd /risingwave/java && mvn -B package -Dmaven.test.skip=true && \
46+
RUN cd /risingwave/java && mvn -B package -Dmaven.test.skip=true -Djava.binding.release=true && \
4847
mkdir -p /risingwave/bin/connector-node && \
4948
tar -zxvf /risingwave/java/connector-node/assembly/target/risingwave-connector-1.0.0.tar.gz -C /risingwave/bin/connector-node
5049

@@ -57,7 +56,6 @@ RUN mkdir -p /risingwave/bin/connector-node && mkdir -p /risingwave/lib
5756
COPY --from=builder /risingwave/bin/risingwave /risingwave/bin/risingwave
5857
COPY --from=builder /risingwave/bin/connector-node /risingwave/bin/connector-node
5958
COPY --from=builder /risingwave/ui /risingwave/ui
60-
COPY --from=builder /risingwave/lib/librisingwave_java_binding.so /risingwave/lib/librisingwave_java_binding.so
6159

6260
# hadoop
6361
RUN wget https://rw-yufan.s3.ap-southeast-1.amazonaws.com/hadoop-2.7.3.tar.gz -P /root/
@@ -75,8 +73,6 @@ ARG JAVA_HOME_PATH
7573
ENV JAVA_HOME ${JAVA_HOME_PATH}
7674
ENV LD_LIBRARY_PATH ${JAVA_HOME_PATH}/lib/server:${LD_LIBRARY_PATH}
7775

78-
# Set java.library.path env to /risingwave/lib
79-
ENV RW_JAVA_BINDING_LIB_PATH /risingwave/lib
8076
# Set default playground mode to docker-playground profile
8177
ENV PLAYGROUND_PROFILE docker-playground
8278
# Set default dashboard UI to local path instead of github proxy

docker/dashboards/risingwave-dev-dashboard.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docker/dashboards/risingwave-user-dashboard.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
statement error
2+
select p, percentile_cont(p) within group (order by x::float8)
3+
from generate_series(1,5) x,
4+
(values (0::float8),(0.1),(0.25),(0.4),(0.5),(0.6),(0.75),(0.9),(1)) v(p)
5+
group by p order by p;
6+
7+
statement error
8+
select percentile_cont(array[0,1,0.25,0.75,0.5,1,0.3,0.32,0.35,0.38,0.4]) within group (order by x)
9+
from generate_series(1,6) x;
10+
11+
statement error
12+
select percentile_disc(array[0.25,0.5,0.75]) within group (order by x)
13+
from unnest('{fred,jim,fred,jack,jill,fred,jill,jim,jim,sheila,jim,sheila}'::text[]) u(x);
14+
15+
statement error
16+
select pg_collation_for(percentile_disc(1) within group (order by x collate "POSIX"))
17+
from (values ('fred'),('jim')) v(x);
18+
19+
query RR
20+
select
21+
percentile_cont(0.5) within group (order by a),
22+
percentile_disc(0.5) within group (order by a)
23+
from (values(1::float8),(3),(5),(7)) t(a);
24+
----
25+
4 3
26+
27+
query RR
28+
select
29+
percentile_cont(0.25) within group (order by a),
30+
percentile_disc(0.5) within group (order by a)
31+
from (values(1::float8),(3),(5),(7)) t(a);
32+
----
33+
2.5 3
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
query I
2+
select abs.abs from abs(-1);
3+
----
4+
1
5+
6+
query I
7+
select alias.alias from abs(-1) alias;
8+
----
9+
1
10+
11+
query I
12+
select alias.col from abs(-1) alias(col);
13+
----
14+
1

0 commit comments

Comments
 (0)