Skip to content

Commit

Permalink
chore: codefmt
Browse files Browse the repository at this point in the history
  • Loading branch information
KKould committed Dec 26, 2024
1 parent 6d6be6c commit 45697e0
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/common/function/src/scalars/vector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
14 changes: 14 additions & 0 deletions src/common/function/src/scalars/vector/elem_sum.rs
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
14 changes: 14 additions & 0 deletions src/common/function/src/scalars/vector/sum.rs
Original file line number Diff line number Diff line change
@@ -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};
Expand Down
4 changes: 2 additions & 2 deletions src/query/src/tests/vec_sum_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)?;
Expand Down

0 comments on commit 45697e0

Please sign in to comment.