Skip to content

Commit 06f380b

Browse files
committed
feat: add arithmetic function for bitwise not with decimal arguments
1 parent 60c93d2 commit 06f380b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

extensions/functions_arithmetic_decimal.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,17 @@ scalar_functions:
149149
return: |-
150150
max_precision = max(P1, P2)
151151
DECIMAL<max_precision, 0>
152+
- name: "bitwise_not"
153+
description: >
154+
Return the bitwise NOT result for one decimal input.
155+
In inputs scale must be 0 (i.e. only integer types are allowed).
156+
Result precision should be one more than input precision.
157+
Result exceeding precision limit will raise an error.
158+
impls:
159+
- args:
160+
- name: x
161+
value: "DECIMAL<P,0>"
162+
return: "DECIMAL<P+1,0>"
152163
aggregate_functions:
153164
- name: "sum"
154165
description: Sum a set of values.

0 commit comments

Comments
 (0)