Skip to content

Commit

Permalink
feat: add bitwise NOT, AND, OR & XOR functions (#370)
Browse files Browse the repository at this point in the history
  • Loading branch information
PHILO-HE authored Dec 13, 2022
1 parent 7f272f1 commit 81e34d4
Showing 1 changed file with 112 additions and 0 deletions.
112 changes: 112 additions & 0 deletions extensions/functions_arithmetic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -745,6 +745,118 @@ scalar_functions:
overflow:
values: [ SILENT, SATURATE, ERROR ]
return: i64
-
name: "bitwise_not"
description: >
Return the bitwise NOT result for one integer input.
impls:
- args:
- name: x
value: i8
return: i8
- args:
- name: x
value: i16
return: i16
- args:
- name: x
value: i32
return: i32
- args:
- name: x
value: i64
return: i64
-
name: "bitwise_and"
description: >
Return the bitwise AND result for two integer inputs.
impls:
- args:
- name: x
value: i8
- name: y
value: i8
return: i8
- args:
- name: x
value: i16
- name: y
value: i16
return: i16
- args:
- name: x
value: i32
- name: y
value: i32
return: i32
- args:
- name: x
value: i64
- name: y
value: i64
return: i64
-
name: "bitwise_or"
description: >
Return the bitwise OR result for two given integer inputs.
impls:
- args:
- name: x
value: i8
- name: y
value: i8
return: i8
- args:
- name: x
value: i16
- name: y
value: i16
return: i16
- args:
- name: x
value: i32
- name: y
value: i32
return: i32
- args:
- name: x
value: i64
- name: y
value: i64
return: i64
-
name: "bitwise_xor"
description: >
Return the bitwise XOR result for two integer inputs.
impls:
- args:
- name: x
value: i8
- name: y
value: i8
return: i8
- args:
- name: x
value: i16
- name: y
value: i16
return: i16
- args:
- name: x
value: i32
- name: y
value: i32
return: i32
- args:
- name: x
value: i64
- name: y
value: i64
return: i64

aggregate_functions:
- name: "sum"
Expand Down

0 comments on commit 81e34d4

Please sign in to comment.