Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
TCeason committed Dec 30, 2024
1 parent 8722ef2 commit 40a7f75
Show file tree
Hide file tree
Showing 12 changed files with 23 additions and 23 deletions.
12 changes: 6 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ databend-enterprise-vacuum-handler = { path = "src/query/ee_features/vacuum_hand
databend-enterprise-virtual-column = { path = "src/query/ee_features/virtual_column" }
databend-functions-scalar-arithmetic = { path = "src/query/functions/src/scalars/arithmetic" }
databend-functions-scalar-datetime = { path = "src/query/functions/src/scalars/timestamp" }
databend-functions-scalar-decimal-utils = { path = "src/query/functions/src/scalars/decimal" }
databend-functions-scalar-decimal = { path = "src/query/functions/src/scalars/decimal" }
databend-functions-scalar-geo = { path = "src/query/functions/src/scalars/geographic" }
databend-functions-scalar-math = { path = "src/query/functions/src/scalars/mathematics" }
databend-functions-scalar-numeric-basic-arithmetic = { path = "src/query/functions/src/scalars/numeric_basic_arithmetic" }
Expand Down
3 changes: 1 addition & 2 deletions src/query/functions/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,9 @@ databend-common-openai = { workspace = true }
databend-common-vector = { workspace = true }
databend-functions-scalar-arithmetic = { workspace = true }
databend-functions-scalar-datetime = { workspace = true }
databend-functions-scalar-decimal-utils = { workspace = true }
databend-functions-scalar-decimal = { workspace = true }
databend-functions-scalar-geo = { workspace = true }
databend-functions-scalar-math = { workspace = true }
databend-functions-scalar-numeric-basic-arithmetic = { workspace = true }
ethnum = { workspace = true }
geo = { workspace = true }
geohash = { workspace = true }
Expand Down
3 changes: 2 additions & 1 deletion src/query/functions/src/scalars/arithmetic/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ edition = "2021"

[dependencies]
databend-common-expression = { workspace = true }
databend-functions-scalar-decimal-utils = { workspace = true }
databend-functions-scalar-decimal = { workspace = true }
databend-functions-scalar-numeric-basic-arithmetic = { workspace = true }
ethnum = { workspace = true }
lexical-core = { workspace = true }
match-template = { workspace = true }
Expand Down
9 changes: 6 additions & 3 deletions src/query/functions/src/scalars/arithmetic/src/arithmetic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,13 @@ use databend_common_expression::FunctionDomain;
use databend_common_expression::FunctionEval;
use databend_common_expression::FunctionRegistry;
use databend_common_expression::FunctionSignature;
use databend_functions_scalar_decimal_utils::register_decimal_to_float;
use databend_functions_scalar_decimal_utils::register_decimal_to_int;
use databend_functions_scalar_decimal_utils::register_decimal_to_string;
use databend_functions_scalar_decimal::register_decimal_to_float;
use databend_functions_scalar_decimal::register_decimal_to_int;
use databend_functions_scalar_decimal::register_decimal_to_string;
use ethnum::i256;
use lexical_core::FormattedSize;
use num_traits::AsPrimitive;
use databend_functions_scalar_numeric_basic_arithmetic::register_numeric_basic_arithmetic;

pub fn register(registry: &mut FunctionRegistry) {
registry.register_aliases("plus", &["add"]);
Expand All @@ -77,6 +78,8 @@ pub fn register(registry: &mut FunctionRegistry) {
register_string_to_number(registry);
register_number_to_string(registry);
register_number_to_number(registry);
// register basic arithmetic operation (+ - * / %)
register_numeric_basic_arithmetic(registry);
register_binary_arithmetic(registry);
register_unary_arithmetic(registry);
}
Expand Down
2 changes: 1 addition & 1 deletion src/query/functions/src/scalars/comparison.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ use databend_common_expression::LikePattern;
use databend_common_expression::Scalar;
use databend_common_expression::ScalarRef;
use databend_common_expression::SimpleDomainCmp;
use databend_functions_scalar_decimal_utils::register_decimal_compare_op;
use databend_functions_scalar_decimal::register_decimal_compare_op;
use regex::Regex;

use crate::scalars::string_multi_args::regexp;
Expand Down
2 changes: 1 addition & 1 deletion src/query/functions/src/scalars/decimal/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "databend-functions-scalar-decimal-utils"
name = "databend-functions-scalar-decimal"
version = "0.1.0"
edition = "2021"

Expand Down
2 changes: 1 addition & 1 deletion src/query/functions/src/scalars/mathematics/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ edition = "2021"
crc32fast = { workspace = true }
databend-common-base = { workspace = true }
databend-common-expression = { workspace = true }
databend-functions-scalar-decimal-utils = { workspace = true }
databend-functions-scalar-decimal = { workspace = true }
match-template = { workspace = true }
num-traits = { workspace = true }

Expand Down
2 changes: 1 addition & 1 deletion src/query/functions/src/scalars/mathematics/src/math.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ use databend_common_expression::with_number_mapped_type;
use databend_common_expression::FunctionDomain;
use databend_common_expression::FunctionRegistry;
use databend_common_expression::Value;
use databend_functions_scalar_decimal_utils::register_decimal_math;
use databend_functions_scalar_decimal::register_decimal_math;
use num_traits::AsPrimitive;
use num_traits::Float;
use num_traits::Pow;
Expand Down
5 changes: 1 addition & 4 deletions src/query/functions/src/scalars/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,10 @@ mod vector;

pub use comparison::ALL_COMP_FUNC_NAMES;
use databend_functions_scalar_arithmetic::arithmetic;
use databend_functions_scalar_numeric_basic_arithmetic::register_numeric_basic_arithmetic;
pub use string::ALL_STRING_FUNC_NAMES;

pub fn register(registry: &mut FunctionRegistry) {
variant::register(registry);
// register basic arithmetic operation (+ - * / %)
register_numeric_basic_arithmetic(registry);
arithmetic::register(registry);
array::register(registry);
boolean::register(registry);
Expand All @@ -69,7 +66,7 @@ pub fn register(registry: &mut FunctionRegistry) {
geo_func::geo_h3::register(registry);
hash::register(registry);
other::register(registry);
databend_functions_scalar_decimal_utils::register_to_decimal(registry);
databend_functions_scalar_decimal::register_to_decimal(registry);
vector::register(registry);
bitmap::register(registry);
geo_func::geometry::register(registry);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"

[dependencies]
databend-common-expression = { workspace = true }
databend-functions-scalar-decimal-utils = { workspace = true }
databend-functions-scalar-decimal = { workspace = true }
match-template = { workspace = true }
num-traits = { workspace = true }
strength_reduce = { workspace = true }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ use databend_common_expression::with_float_mapped_type;
use databend_common_expression::with_integer_mapped_type;
use databend_common_expression::FunctionDomain;
use databend_common_expression::FunctionRegistry;
use databend_functions_scalar_decimal_utils::register_decimal_arithmetic;
use databend_functions_scalar_decimal::register_decimal_arithmetic;
use num_traits::AsPrimitive;

use crate::arithmetic_modulo::vectorize_modulo;
Expand Down

0 comments on commit 40a7f75

Please sign in to comment.