From beff1f039b618f8f14b3c699e139234964c0b2f7 Mon Sep 17 00:00:00 2001 From: Jensen Date: Tue, 21 May 2024 16:27:07 +0800 Subject: [PATCH] feat: abs add decimal type (#637) --- extensions/functions_arithmetic_decimal.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/extensions/functions_arithmetic_decimal.yaml b/extensions/functions_arithmetic_decimal.yaml index a0f93db24..b62c63484 100644 --- a/extensions/functions_arithmetic_decimal.yaml +++ b/extensions/functions_arithmetic_decimal.yaml @@ -102,6 +102,15 @@ scalar_functions: scale_after_borrow = max(init_scale - delta, min_scale) scale = init_prec > 38 ? scale_after_borrow : init_scale DECIMAL + - + name: "abs" + description: Calculate the absolute value of the argument. + impls: + - args: + - name: x + value: decimal + return: decimal + aggregate_functions: - name: "sum" description: Sum a set of values.