Skip to content

Commit

Permalink
feat: adding SUM0 definition for aggregate functions (#465)
Browse files Browse the repository at this point in the history
closes #259
  • Loading branch information
vibhatha committed Mar 27, 2023
1 parent 3955871 commit 73228b4
Showing 1 changed file with 66 additions and 0 deletions.
66 changes: 66 additions & 0 deletions extensions/functions_arithmetic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -922,6 +922,72 @@ aggregate_functions:
decomposable: MANY
intermediate: fp64?
return: fp64?
- name: "sum0"
description: >
Sum a set of values. The sum of zero elements yields zero.
Null values are ignored.
impls:
- args:
- name: x
value: i8
options:
overflow:
values: [ SILENT, SATURATE, ERROR ]
nullability: DECLARED_OUTPUT
decomposable: MANY
intermediate: i64
return: i64
- args:
- name: x
value: i16
options:
overflow:
values: [ SILENT, SATURATE, ERROR ]
nullability: DECLARED_OUTPUT
decomposable: MANY
intermediate: i64
return: i64
- args:
- name: x
value: i32
options:
overflow:
values: [ SILENT, SATURATE, ERROR ]
nullability: DECLARED_OUTPUT
decomposable: MANY
intermediate: i64
return: i64
- args:
- name: x
value: i64
options:
overflow:
values: [ SILENT, SATURATE, ERROR ]
nullability: DECLARED_OUTPUT
decomposable: MANY
intermediate: i64
return: i64
- args:
- name: x
value: fp32
options:
overflow:
values: [ SILENT, SATURATE, ERROR ]
nullability: DECLARED_OUTPUT
decomposable: MANY
intermediate: fp64
return: fp64
- args:
- name: x
value: fp64
options:
overflow:
values: [ SILENT, SATURATE, ERROR ]
nullability: DECLARED_OUTPUT
decomposable: MANY
intermediate: fp64
return: fp64
- name: "avg"
description: Average a set of values. For integral types, this truncates partial values.
impls:
Expand Down

0 comments on commit 73228b4

Please sign in to comment.