From 7e1de8c43f85a9d61d96e0647bbc17d2de47cf77 Mon Sep 17 00:00:00 2001 From: Xinhao Xu <84456268+xxhZs@users.noreply.github.com> Date: Wed, 28 Feb 2024 17:29:24 +0800 Subject: [PATCH 1/4] fix(ci): remove doris sink ci (#15332) --- ci/docker-compose.yml | 51 ------------------------------ ci/workflows/main-cron.yml | 59 ++++++++++++++++++----------------- ci/workflows/pull-request.yml | 47 ++++++++++++++-------------- 3 files changed, 54 insertions(+), 103 deletions(-) diff --git a/ci/docker-compose.yml b/ci/docker-compose.yml index 852f9afc4deb8..829aaf2dd0a65 100644 --- a/ci/docker-compose.yml +++ b/ci/docker-compose.yml @@ -96,18 +96,6 @@ services: volumes: - ..:/risingwave - sink-doris-env: - image: public.ecr.aws/x5u3w5h6/rw-build-env:v20231109 - depends_on: - - doris-fe-server - - doris-be-server - volumes: - - ..:/risingwave - command: > - sh -c "sudo sysctl -w vm.max_map_count=2000000" - networks: - mynetwork: - ipv4_address: 172.121.0.4 rw-build-env: image: public.ecr.aws/x5u3w5h6/rw-build-env:v20240223 @@ -189,39 +177,6 @@ services: timeout: 30s retries: 50 - doris-fe-server: - platform: linux/amd64 - image: apache/doris:2.0.0_alpha-fe-x86_64 - hostname: doris-fe-server - command: > - sh -c "sudo sysctl -w vm.max_map_count=2000000" - environment: - - FE_SERVERS=fe1:172.121.0.2:9010 - - FE_ID=1 - ports: - - "8030:8030" - - "9030:9030" - networks: - mynetwork: - ipv4_address: 172.121.0.2 - - doris-be-server: - platform: linux/amd64 - image: apache/doris:2.0.0_alpha-be-x86_64 - hostname: doris-be-server - command: > - sh -c "sudo sysctl -w vm.max_map_count=2000000" - environment: - - FE_SERVERS=fe1:172.121.0.2:9010 - - BE_ADDR=172.121.0.3:9050 - depends_on: - - doris-fe-server - ports: - - "9050:9050" - networks: - mynetwork: - ipv4_address: 172.121.0.3 - cassandra-server: container_name: cassandra-server image: cassandra:4.0 @@ -319,9 +274,3 @@ services: interval: 5s timeout: 5s retries: 5 -networks: - mynetwork: - ipam: - config: - - subnet: 172.121.80.0/16 - default: diff --git a/ci/workflows/main-cron.yml b/ci/workflows/main-cron.yml index 15d9733fa3856..d7bb61744795d 100644 --- a/ci/workflows/main-cron.yml +++ b/ci/workflows/main-cron.yml @@ -834,36 +834,37 @@ steps: timeout_in_minutes: 10 retry: *auto-retry - - label: "set vm_max_map_count_2000000" - key: "set-vm_max_map_count" - if: | - !(build.pull_request.labels includes "ci/main-cron/skip-ci") && build.env("CI_STEPS") == null - || build.pull_request.labels includes "ci/run-e2e-doris-sink-tests" - || build.env("CI_STEPS") =~ /(^|,)e2e-doris-sink-tests?(,|$$)/ - command: "sudo sysctl -w vm.max_map_count=2000000" - depends_on: - - "build" - - "build-other" + # Causes ci error, close it first, fix it later + # - label: "set vm_max_map_count_2000000" + # key: "set-vm_max_map_count" + # if: | + # !(build.pull_request.labels includes "ci/main-cron/skip-ci") && build.env("CI_STEPS") == null + # || build.pull_request.labels includes "ci/run-e2e-doris-sink-tests" + # || build.env("CI_STEPS") =~ /(^|,)e2e-doris-sink-tests?(,|$$)/ + # command: "sudo sysctl -w vm.max_map_count=2000000" + # depends_on: + # - "build" + # - "build-other" - - label: "end-to-end doris sink test" - key: "e2e-doris-sink-tests" - command: "ci/scripts/e2e-doris-sink-test.sh -p ci-release" - if: | - !(build.pull_request.labels includes "ci/main-cron/skip-ci") && build.env("CI_STEPS") == null - || build.pull_request.labels includes "ci/run-e2e-doris-sink-tests" - || build.env("CI_STEPS") =~ /(^|,)e2e-doris-sink-tests?(,|$$)/ - depends_on: - - "build" - - "build-other" - - "set-vm_max_map_count" - plugins: - - docker-compose#v5.1.0: - run: sink-doris-env - config: ci/docker-compose.yml - mount-buildkite-agent: true - - ./ci/plugins/upload-failure-logs - timeout_in_minutes: 10 - retry: *auto-retry + # - label: "end-to-end doris sink test" + # key: "e2e-doris-sink-tests" + # command: "ci/scripts/e2e-doris-sink-test.sh -p ci-release" + # if: | + # !(build.pull_request.labels includes "ci/main-cron/skip-ci") && build.env("CI_STEPS") == null + # || build.pull_request.labels includes "ci/run-e2e-doris-sink-tests" + # || build.env("CI_STEPS") =~ /(^|,)e2e-doris-sink-tests?(,|$$)/ + # depends_on: + # - "build" + # - "build-other" + # - "set-vm_max_map_count" + # plugins: + # - docker-compose#v5.1.0: + # run: sink-doris-env + # config: ci/docker-compose.yml + # mount-buildkite-agent: true + # - ./ci/plugins/upload-failure-logs + # timeout_in_minutes: 10 + # retry: *auto-retry - label: "end-to-end starrocks sink test" key: "e2e-starrocks-sink-tests" diff --git a/ci/workflows/pull-request.yml b/ci/workflows/pull-request.yml index 04961b3838bd9..c4255657bb532 100644 --- a/ci/workflows/pull-request.yml +++ b/ci/workflows/pull-request.yml @@ -307,29 +307,30 @@ steps: timeout_in_minutes: 10 retry: *auto-retry - - label: "set vm_max_map_count_2000000" - key: "set-vm_max_map_count" - if: build.pull_request.labels includes "ci/run-e2e-doris-sink-tests" || build.env("CI_STEPS") =~ /(^|,) e2e-doris-sink-tests?(,|$$)/ - command: "sudo sysctl -w vm.max_map_count=2000000" - depends_on: - - "build" - - "build-other" - - - label: "end-to-end doris sink test" - if: build.pull_request.labels includes "ci/run-e2e-doris-sink-tests" || build.env("CI_STEPS") =~ /(^|,) e2e-doris-sink-tests?(,|$$)/ - command: "ci/scripts/e2e-doris-sink-test.sh -p ci-dev" - depends_on: - - "build" - - "build-other" - - "set-vm_max_map_count" - plugins: - - docker-compose#v5.1.0: - run: sink-doris-env - config: ci/docker-compose.yml - mount-buildkite-agent: true - - ./ci/plugins/upload-failure-logs - timeout_in_minutes: 10 - retry: *auto-retry + # Causes ci error, close it first, fix it later + # - label: "set vm_max_map_count_2000000" + # key: "set-vm_max_map_count" + # if: build.pull_request.labels includes "ci/run-e2e-doris-sink-tests" || build.env("CI_STEPS") =~ /(^|,) e2e-doris-sink-tests?(,|$$)/ + # command: "sudo sysctl -w vm.max_map_count=2000000" + # depends_on: + # - "build" + # - "build-other" + + # - label: "end-to-end doris sink test" + # if: build.pull_request.labels includes "ci/run-e2e-doris-sink-tests" || build.env("CI_STEPS") =~ /(^|,) e2e-doris-sink-tests?(,|$$)/ + # command: "ci/scripts/e2e-doris-sink-test.sh -p ci-dev" + # depends_on: + # - "build" + # - "build-other" + # - "set-vm_max_map_count" + # plugins: + # - docker-compose#v5.1.0: + # run: sink-doris-env + # config: ci/docker-compose.yml + # mount-buildkite-agent: true + # - ./ci/plugins/upload-failure-logs + # timeout_in_minutes: 10 + # retry: *auto-retry - label: "end-to-end starrocks sink test" if: build.pull_request.labels includes "ci/run-e2e-starrocks-sink-tests" || build.env("CI_STEPS") =~ /(^|,) e2e-starrocks-sink-tests?(,|$$)/ From ddade85a8c4e4e34767ec3880b817cc7079cca0f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 28 Feb 2024 09:49:52 +0000 Subject: [PATCH 2/4] chore(deps): Bump fancy-regex from 0.11.0 to 0.13.0 (#15308) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dependabot[bot] --- Cargo.lock | 15 ++------------- src/frontend/Cargo.toml | 2 +- src/workspace-hack/Cargo.toml | 1 - 3 files changed, 3 insertions(+), 15 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f7baf907709d7..315c71aad11f8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3887,16 +3887,6 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649" -[[package]] -name = "fancy-regex" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b95f7c0680e4142284cf8b22c14a476e87d61b004a3a0861872b32ef7ead40a2" -dependencies = [ - "bit-set", - "regex", -] - [[package]] name = "fancy-regex" version = "0.13.0" @@ -9369,7 +9359,7 @@ dependencies = [ "chrono-tz", "criterion", "expect-test", - "fancy-regex 0.13.0", + "fancy-regex", "futures-async-stream", "futures-util", "hex", @@ -9431,7 +9421,7 @@ dependencies = [ "educe 0.5.7", "either", "enum-as-inner", - "fancy-regex 0.11.0", + "fancy-regex", "fixedbitset", "futures", "futures-async-stream", @@ -13979,7 +13969,6 @@ dependencies = [ "axum", "base64 0.21.4", "bigdecimal 0.4.2", - "bit-set", "bit-vec", "bitflags 2.4.0", "byteorder", diff --git a/src/frontend/Cargo.toml b/src/frontend/Cargo.toml index dc6bc8d84d294..53ece7967f189 100644 --- a/src/frontend/Cargo.toml +++ b/src/frontend/Cargo.toml @@ -33,7 +33,7 @@ easy-ext = "1" educe = "0.5" either = "1" enum-as-inner = "0.6" -fancy-regex = "0.11.0" +fancy-regex = "0.13.0" fixedbitset = "0.4.2" futures = { version = "0.3", default-features = false, features = ["alloc"] } futures-async-stream = { workspace = true } diff --git a/src/workspace-hack/Cargo.toml b/src/workspace-hack/Cargo.toml index cd1bbc039287a..9bbeb2b9433f9 100644 --- a/src/workspace-hack/Cargo.toml +++ b/src/workspace-hack/Cargo.toml @@ -32,7 +32,6 @@ aws-smithy-types = { version = "1", default-features = false, features = ["byte- axum = { version = "0.6" } base64 = { version = "0.21", features = ["alloc"] } bigdecimal = { version = "0.4" } -bit-set = { version = "0.5" } bit-vec = { version = "0.6" } bitflags = { version = "2", default-features = false, features = ["serde", "std"] } byteorder = { version = "1" } From ff02b76c838c168f48f41b4c956a9a55a160ba25 Mon Sep 17 00:00:00 2001 From: Runji Wang Date: Wed, 28 Feb 2024 18:00:26 +0800 Subject: [PATCH 3/4] fix(udf): add `embedded-python-udf` feature and fix dockerfile (#15328) Signed-off-by: Runji Wang --- Cargo.lock | 1 + Makefile.toml | 6 +++++ ci/scripts/build.sh | 1 + docker/Dockerfile | 9 ++++++- docker/Dockerfile.hdfs | 9 ++++++- docs/developer-guide.md | 26 +++++++++++++++++++ src/cmd_all/Cargo.toml | 2 ++ src/expr/core/Cargo.toml | 5 +++- src/expr/core/src/expr/expr_udf.rs | 6 ++++- .../core/src/table_function/user_defined.rs | 14 +++------- 10 files changed, 65 insertions(+), 14 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 315c71aad11f8..f722a4585a48e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8834,6 +8834,7 @@ dependencies = [ "risingwave_compactor", "risingwave_compute", "risingwave_ctl", + "risingwave_expr", "risingwave_expr_impl", "risingwave_frontend", "risingwave_meta_node", diff --git a/Makefile.toml b/Makefile.toml index 8820acf67c7bd..5422e42cca06d 100644 --- a/Makefile.toml +++ b/Makefile.toml @@ -35,6 +35,7 @@ is_release = get_env ENABLE_RELEASE_PROFILE is_not_release = not ${is_release} is_dynamic_linking = get_env ENABLE_DYNAMIC_LINKING is_hummock_trace = get_env ENABLE_HUMMOCK_TRACE +is_python_udf_enabled = get_env ENABLE_PYTHON_UDF if ${is_sanitizer_enabled} set_env RISEDEV_CARGO_BUILD_EXTRA_ARGS "-Zbuild-std --target ${CARGO_MAKE_RUST_TARGET_TRIPLE}" @@ -65,6 +66,11 @@ else set_env RISINGWAVE_FEATURE_FLAGS "--features rw-static-link" end +if ${is_python_udf_enabled} + flags = get_env RISINGWAVE_FEATURE_FLAGS + set_env RISINGWAVE_FEATURE_FLAGS "${flags} --features embedded-python-udf" +end + if ${is_hummock_trace} set_env BUILD_HUMMOCK_TRACE_CMD "-p risingwave_storage --features hm-trace" else diff --git a/ci/scripts/build.sh b/ci/scripts/build.sh index 5fed2cfeedf1b..91b26bee8d383 100755 --- a/ci/scripts/build.sh +++ b/ci/scripts/build.sh @@ -53,6 +53,7 @@ cargo build \ -p risingwave_compaction_test \ -p risingwave_e2e_extended_mode_test \ $RISINGWAVE_FEATURE_FLAGS \ + --features embedded-python-udf \ --profile "$profile" diff --git a/docker/Dockerfile b/docker/Dockerfile index ed24e05ede2d2..d42dc74da3f11 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -5,6 +5,13 @@ ENV LANG en_US.utf8 RUN apt-get update \ && apt-get -y install ca-certificates build-essential libsasl2-dev openjdk-11-jdk +# Install Python 3.12 +RUN apt-get -y install software-properties-common +RUN add-apt-repository ppa:deadsnakes/ppa -y && \ + apt-get update -yy && \ + DEBIAN_FRONTEND=noninteractive apt-get install python3.12 python3.12-dev -yy +ENV PYO3_PYTHON=python3.12 + FROM base AS dashboard-builder RUN apt-get update && apt-get install -y curl gnupg protobuf-compiler && mkdir -p /etc/apt/keyrings \ @@ -70,7 +77,7 @@ COPY ./ /risingwave WORKDIR /risingwave RUN cargo fetch && \ - cargo build -p risingwave_cmd_all --release --features "rw-static-link" && \ + cargo build -p risingwave_cmd_all --release --features "rw-static-link" --features embedded-python-udf && \ mkdir -p /risingwave/bin && \ mv /risingwave/target/release/risingwave /risingwave/bin/ && \ mv /risingwave/target/release/risingwave.dwp /risingwave/bin/ && \ diff --git a/docker/Dockerfile.hdfs b/docker/Dockerfile.hdfs index 98cb5a566d92f..28859a453c9a1 100644 --- a/docker/Dockerfile.hdfs +++ b/docker/Dockerfile.hdfs @@ -5,6 +5,13 @@ ENV LANG en_US.utf8 RUN apt-get update \ && apt-get -y install ca-certificates build-essential libsasl2-dev openjdk-11-jdk +# Install Python 3.12 +RUN apt-get -y install software-properties-common +RUN add-apt-repository ppa:deadsnakes/ppa -y && \ + apt-get update -yy && \ + DEBIAN_FRONTEND=noninteractive apt-get install python3.12 python3.12-dev -yy +ENV PYO3_PYTHON=python3.12 + FROM base AS builder RUN apt-get update && apt-get -y install make cmake protobuf-compiler curl bash lld maven unzip @@ -45,7 +52,7 @@ ENV JAVA_HOME ${JAVA_HOME_PATH} ENV LD_LIBRARY_PATH ${JAVA_HOME_PATH}/lib/server:${LD_LIBRARY_PATH} RUN cargo fetch && \ - cargo build -p risingwave_cmd_all --release -p risingwave_object_store --features hdfs-backend --features "rw-static-link" && \ + cargo build -p risingwave_cmd_all --release -p risingwave_object_store --features hdfs-backend --features "rw-static-link" --features embedded-python-udf && \ mkdir -p /risingwave/bin && \ mv /risingwave/target/release/risingwave /risingwave/bin/ && \ mv /risingwave/target/release/risingwave.dwp /risingwave/bin/ && \ diff --git a/docs/developer-guide.md b/docs/developer-guide.md index 81e9aae0048bb..8cf5dcd4ebbaa 100644 --- a/docs/developer-guide.md +++ b/docs/developer-guide.md @@ -75,6 +75,7 @@ RiseDev is the development mode of RisingWave. To develop RisingWave, you need t * PostgreSQL (psql) (>= 14.1) * Tmux (>= v3.2a) * LLVM 16 (For macOS only, to workaround some bugs in macOS toolchain. See https://github.com/risingwavelabs/risingwave/issues/6205) +* Python (>= 3.12) (Optional, only required by `embedded-python-udf` feature) To install the dependencies on macOS, run: @@ -96,6 +97,31 @@ Then you'll be able to compile and start RiseDev! > > `.cargo/config.toml` contains `rustflags` configurations like `-Clink-arg` and `-Ctarget-feature`. Since it will be [merged](https://doc.rust-lang.org/cargo/reference/config.html#hierarchical-structure) with `$HOME/.cargo/config.toml`, check the config files and make sure they don't conflict if you have global `rustflags` configurations for e.g. linker there. +> [!INFO] +> +> If you want to build RisingWave with `embedded-python-udf` feature, you need to install Python 3.12. +> +> To install Python 3.12 on macOS, run: +> +> ```shell +> brew install python@3.12 +> ``` +> +> To install Python 3.12 on Debian-based Linux systems, run: +> +> ```shell +> sudo apt install software-properties-common +> sudo add-apt-repository ppa:deadsnakes/ppa +> sudo apt-get update +> sudo apt-get install python3.12 python3.12-dev +> ``` +> +> If the default `python3` version is not 3.12, please set the `PYO3_PYTHON` environment variable: +> +> ```shell +> export PYO3_PYTHON=python3.12 +> ``` + ## Start and monitor a dev cluster You can now build RiseDev and start a dev cluster. It is as simple as: diff --git a/src/cmd_all/Cargo.toml b/src/cmd_all/Cargo.toml index c5f193ef8a2a3..813928ce931ea 100644 --- a/src/cmd_all/Cargo.toml +++ b/src/cmd_all/Cargo.toml @@ -10,6 +10,7 @@ repository = { workspace = true } [features] rw-static-link = ["workspace-config/rw-static-link"] rw-dynamic-link = ["workspace-config/rw-dynamic-link"] +embedded-python-udf = ["risingwave_expr/embedded-python-udf"] default = ["rw-static-link"] [package.metadata.cargo-machete] @@ -30,6 +31,7 @@ risingwave_common = { workspace = true } risingwave_compactor = { workspace = true } risingwave_compute = { workspace = true } risingwave_ctl = { workspace = true } +risingwave_expr = { workspace = true } risingwave_expr_impl = { workspace = true } risingwave_frontend = { workspace = true } risingwave_meta_node = { workspace = true } diff --git a/src/expr/core/Cargo.toml b/src/expr/core/Cargo.toml index e4eb82966b038..03ed84ac6a216 100644 --- a/src/expr/core/Cargo.toml +++ b/src/expr/core/Cargo.toml @@ -15,12 +15,15 @@ ignored = ["workspace-hack", "ctor"] [package.metadata.cargo-udeps.ignore] normal = ["workspace-hack", "ctor"] +[features] +embedded-python-udf = ["arrow-udf-python"] + [dependencies] anyhow = "1" arrow-array = { workspace = true } arrow-schema = { workspace = true } arrow-udf-js = { workspace = true } -arrow-udf-python = { workspace = true } +arrow-udf-python = { workspace = true, optional = true } arrow-udf-wasm = { workspace = true } async-trait = "0.1" auto_impl = "1" diff --git a/src/expr/core/src/expr/expr_udf.rs b/src/expr/core/src/expr/expr_udf.rs index c3d5193efb617..7acd4307b71f3 100644 --- a/src/expr/core/src/expr/expr_udf.rs +++ b/src/expr/core/src/expr/expr_udf.rs @@ -21,6 +21,7 @@ use std::time::Duration; use anyhow::Context; use arrow_schema::{Field, Fields, Schema}; use arrow_udf_js::{CallMode as JsCallMode, Runtime as JsRuntime}; +#[cfg(feature = "embedded-python-udf")] use arrow_udf_python::{CallMode as PythonCallMode, Runtime as PythonRuntime}; use arrow_udf_wasm::Runtime as WasmRuntime; use await_tree::InstrumentAwait; @@ -60,10 +61,11 @@ pub struct UserDefinedFunction { const INITIAL_RETRY_COUNT: u8 = 16; #[derive(Debug)] -enum UdfImpl { +pub enum UdfImpl { External(Arc), Wasm(Arc), JavaScript(JsRuntime), + #[cfg(feature = "embedded-python-udf")] Python(PythonRuntime), } @@ -110,6 +112,7 @@ impl UserDefinedFunction { let arrow_output: arrow_array::RecordBatch = match &self.imp { UdfImpl::Wasm(runtime) => runtime.call(&self.identifier, &arrow_input)?, UdfImpl::JavaScript(runtime) => runtime.call(&self.identifier, &arrow_input)?, + #[cfg(feature = "embedded-python-udf")] UdfImpl::Python(runtime) => runtime.call(&self.identifier, &arrow_input)?, UdfImpl::External(client) => { let disable_retry_count = self.disable_retry_count.load(Ordering::Relaxed); @@ -210,6 +213,7 @@ impl Build for UserDefinedFunction { )?; UdfImpl::JavaScript(rt) } + #[cfg(feature = "embedded-python-udf")] "python" if udf.body.is_some() => { let mut rt = PythonRuntime::builder().sandboxed(true).build()?; let body = udf.get_body()?; diff --git a/src/expr/core/src/table_function/user_defined.rs b/src/expr/core/src/table_function/user_defined.rs index 9efd7997b512a..0d1d726c394c7 100644 --- a/src/expr/core/src/table_function/user_defined.rs +++ b/src/expr/core/src/table_function/user_defined.rs @@ -18,16 +18,16 @@ use anyhow::Context; use arrow_array::RecordBatch; use arrow_schema::{Field, Fields, Schema, SchemaRef}; use arrow_udf_js::{CallMode as JsCallMode, Runtime as JsRuntime}; +#[cfg(feature = "embedded-python-udf")] use arrow_udf_python::{CallMode as PythonCallMode, Runtime as PythonRuntime}; -use arrow_udf_wasm::Runtime as WasmRuntime; use cfg_or_panic::cfg_or_panic; use futures_util::stream; use risingwave_common::array::{ArrayError, DataChunk, I32Array}; use risingwave_common::bail; -use risingwave_udf::ArrowFlightUdfClient; use thiserror_ext::AsReport; use super::*; +use crate::expr::expr_udf::UdfImpl; #[derive(Debug)] pub struct UserDefinedTableFunction { @@ -41,14 +41,6 @@ pub struct UserDefinedTableFunction { chunk_size: usize, } -#[derive(Debug)] -enum UdfImpl { - External(Arc), - Wasm(Arc), - JavaScript(JsRuntime), - Python(PythonRuntime), -} - #[async_trait::async_trait] impl TableFunction for UserDefinedTableFunction { fn return_type(&self) -> DataType { @@ -80,6 +72,7 @@ impl UdfImpl { yield res?; } } + #[cfg(feature = "embedded-python-udf")] UdfImpl::Python(runtime) => { for res in runtime.call_table_function(identifier, &input, 1024)? { yield res?; @@ -219,6 +212,7 @@ pub fn new_user_defined(prost: &PbTableFunction, chunk_size: usize) -> Result { let mut rt = PythonRuntime::builder().sandboxed(true).build()?; let body = udtf.get_body()?; From 32ea157ef3ca0d5e8b53d1ec0662bf24e06d9a04 Mon Sep 17 00:00:00 2001 From: TennyZhuang Date: Wed, 28 Feb 2024 18:08:24 +0800 Subject: [PATCH 4/4] fix(frontend): wrong stmt type while `DROP VIEW IF EXISTS` (#15335) Signed-off-by: TennyZhuang --- src/frontend/src/handler/drop_view.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frontend/src/handler/drop_view.rs b/src/frontend/src/handler/drop_view.rs index e11ae5ea36f8e..b24760c36c0c2 100644 --- a/src/frontend/src/handler/drop_view.rs +++ b/src/frontend/src/handler/drop_view.rs @@ -42,7 +42,7 @@ pub async fn handle_drop_view( Ok((t, s)) => (t, s), Err(e) => { return if if_exists { - Ok(RwPgResponse::builder(StatementType::DROP_MATERIALIZED_VIEW) + Ok(RwPgResponse::builder(StatementType::DROP_VIEW) .notice(format!("view \"{}\" does not exist, skipping", table_name)) .into()) } else {