From 09d605c617c1672c34bb00531bcfa6ebb843fa3a Mon Sep 17 00:00:00 2001 From: Bugen Zhao Date: Wed, 11 Dec 2024 15:00:48 +0800 Subject: [PATCH] enable executors in frontend Signed-off-by: Bugen Zhao --- Cargo.lock | 1 + src/batch/executors/src/lib.rs | 8 ++++++++ src/batch/src/executor/test_utils.rs | 2 +- src/frontend/Cargo.toml | 1 + src/frontend/src/lib.rs | 2 ++ 5 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 86476c9f0411f..85da6e253ffc5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -11454,6 +11454,7 @@ dependencies = [ "quick-xml 0.36.1", "rand", "risingwave_batch", + "risingwave_batch_executors", "risingwave_common", "risingwave_common_heap_profiling", "risingwave_common_service", diff --git a/src/batch/executors/src/lib.rs b/src/batch/executors/src/lib.rs index 4680e50f9ab64..8e921da8c7635 100644 --- a/src/batch/executors/src/lib.rs +++ b/src/batch/executors/src/lib.rs @@ -12,6 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. +//! Batch executor implementations. +//! +//! To enable executors in this crate, add the following line to your code: +//! +//! ``` +//! risingwave_batch_executors::enable!(); +//! ``` + #![allow(clippy::derive_partial_eq_without_eq)] #![feature(trait_alias)] #![feature(exact_size_is_empty)] diff --git a/src/batch/src/executor/test_utils.rs b/src/batch/src/executor/test_utils.rs index 4ca5d54b11999..b5e31610d759e 100644 --- a/src/batch/src/executor/test_utils.rs +++ b/src/batch/src/executor/test_utils.rs @@ -56,7 +56,7 @@ impl MockExecutor { Self { chunks: VecDeque::new(), schema, - identity: "MockExecutor".to_string(), + identity: "MockExecutor".to_owned(), } } diff --git a/src/frontend/Cargo.toml b/src/frontend/Cargo.toml index 6e8e084ec98f6..9dfb31a141cc2 100644 --- a/src/frontend/Cargo.toml +++ b/src/frontend/Cargo.toml @@ -117,6 +117,7 @@ workspace-hack = { path = "../workspace-hack" } [dev-dependencies] assert_matches = "1" expect-test = "1" +risingwave_batch_executors = { workspace = true } risingwave_expr_impl = { workspace = true } tempfile = "3" diff --git a/src/frontend/src/lib.rs b/src/frontend/src/lib.rs index 4d788bbd7f014..265bd97af5c93 100644 --- a/src/frontend/src/lib.rs +++ b/src/frontend/src/lib.rs @@ -38,6 +38,8 @@ #[cfg(test)] risingwave_expr_impl::enable!(); +#[cfg(test)] +risingwave_batch_executors::enable!(); #[macro_use] mod catalog;