diff --git a/extensions/functions_arithmetic_decimal.yaml b/extensions/functions_arithmetic_decimal.yaml index 79c6cf8b1..ef1ab0922 100644 --- a/extensions/functions_arithmetic_decimal.yaml +++ b/extensions/functions_arithmetic_decimal.yaml @@ -149,6 +149,23 @@ scalar_functions: return: |- max_precision = max(P1, P2) DECIMAL + - name: "sqrt" + description: Square root of the value. Sqrt of 0 is 0 and sqrt of negative values will raise an error. + impls: + - args: + - name: x + value: "DECIMAL" + return: fp64 + - name: "factorial" + description: > + Return the factorial of a given decimal input. Scale should be 0 for factorial decimal input. + The factorial of 0! is 1 by convention. Negative inputs will raise an error. + Input which cause overflow of result will raise an error. + impls: + - args: + - name: "n" + value: "DECIMAL" + return: "DECIMAL<38,0>" aggregate_functions: - name: "sum" description: Sum a set of values.