Skip to content

Commit

Permalink
feat: add arithmetic function "power" with decimal type (#660)
Browse files Browse the repository at this point in the history
add arithmetic function "power" with decimal type
  • Loading branch information
anshuldata authored Aug 6, 2024
1 parent 5fe2a16 commit 9af2d66
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions extensions/functions_arithmetic_decimal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,23 @@ scalar_functions:
- name: "n"
value: "DECIMAL<P,0>"
return: "DECIMAL<38,0>"
-
name: "power"
description: "Take the power with x as the base and y as exponent.
Behavior for complex number result is indicated by option complex_number_result"
impls:
- args:
- name: x
value: "DECIMAL<P1,S1>"
- name: y
value: "DECIMAL<P2,S2>"
options:
overflow:
values: [ SILENT, SATURATE, ERROR ]
complex_number_result:
values: [ NAN, ERROR ]
return: fp64

aggregate_functions:
- name: "sum"
description: Sum a set of values.
Expand Down

0 comments on commit 9af2d66

Please sign in to comment.