From 45697e041196d9d422f540c056bfff89e88dfca6 Mon Sep 17 00:00:00 2001 From: Kould Date: Thu, 26 Dec 2024 16:53:04 +0800 Subject: [PATCH] chore: codefmt --- src/common/function/src/scalars/vector.rs | 2 +- src/common/function/src/scalars/vector/elem_sum.rs | 14 ++++++++++++++ src/common/function/src/scalars/vector/sum.rs | 14 ++++++++++++++ src/query/src/tests/vec_sum_test.rs | 4 ++-- 4 files changed, 31 insertions(+), 3 deletions(-) diff --git a/src/common/function/src/scalars/vector.rs b/src/common/function/src/scalars/vector.rs index 5783540ec78d..1e81aa0a6a1b 100644 --- a/src/common/function/src/scalars/vector.rs +++ b/src/common/function/src/scalars/vector.rs @@ -18,9 +18,9 @@ mod elem_sum; pub mod impl_conv; mod scalar_add; mod scalar_mul; -mod vector_mul; mod sub; pub(crate) mod sum; +mod vector_mul; use std::sync::Arc; diff --git a/src/common/function/src/scalars/vector/elem_sum.rs b/src/common/function/src/scalars/vector/elem_sum.rs index 62ae5fe6c521..748614e05c0b 100644 --- a/src/common/function/src/scalars/vector/elem_sum.rs +++ b/src/common/function/src/scalars/vector/elem_sum.rs @@ -1,3 +1,17 @@ +// Copyright 2023 Greptime Team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + use std::borrow::Cow; use std::fmt::Display; diff --git a/src/common/function/src/scalars/vector/sum.rs b/src/common/function/src/scalars/vector/sum.rs index 4653ec993c8c..c293abbeb483 100644 --- a/src/common/function/src/scalars/vector/sum.rs +++ b/src/common/function/src/scalars/vector/sum.rs @@ -1,3 +1,17 @@ +// Copyright 2023 Greptime Team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + use std::sync::Arc; use common_macro::{as_aggr_func_creator, AggrFuncTypeStore}; diff --git a/src/query/src/tests/vec_sum_test.rs b/src/query/src/tests/vec_sum_test.rs index 489d5bb0d0a3..990e0eaddb10 100644 --- a/src/query/src/tests/vec_sum_test.rs +++ b/src/query/src/tests/vec_sum_test.rs @@ -14,13 +14,13 @@ async fn test_vec_sum_aggregator() -> Result<(), common_query::error::Error> { common_telemetry::init_default_ut_logging(); let engine = function::create_query_engine_for_vector10x3(); let sql = "select VEC_SUM(vector) as vec_sum from vectors"; - let result = exec_selection(engine.clone(), &sql).await; + let result = exec_selection(engine.clone(), sql).await; let value = function::get_value_from_batches("vec_sum", result); let mut expected_value = None; let sql = "SELECT vector FROM vectors"; - let vectors = exec_selection(engine, &sql).await; + let vectors = exec_selection(engine, sql).await; let column = vectors[0].column(0); let vector_const = as_veclit_if_const(column)?;