Skip to content

Commit

Permalink
feat: add corr and mode aggregation functions (#296)
Browse files Browse the repository at this point in the history
  • Loading branch information
vibhatha authored Sep 5, 2022
1 parent fbe5e09 commit 96b13d7
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions extensions/functions_arithmetic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1083,6 +1083,56 @@ aggregate_functions:
value: fp64
nullability: DECLARED_OUTPUT
return: fp64?
- name: "corr"
description: >
Calculates correlation of two set of values.
If there is no input, null is returned.
impls:
- args:
- name: rounding
options: [ TIE_TO_EVEN, TIE_AWAY_FROM_ZERO, TRUNCATE, CEILING, FLOOR ]
required: false
- value: fp32
- value: fp32
nullability: DECLARED_OUTPUT
return: fp32?
- args:
- name: rounding
options: [ TIE_TO_EVEN, TIE_AWAY_FROM_ZERO, TRUNCATE, CEILING, FLOOR ]
required: false
- value: fp64
- value: fp64
nullability: DECLARED_OUTPUT
return: fp64?
- name: "mode"
description: >
Calculates mode for a set of values.
If there is no input, null is returned.
impls:
- args:
- value: i8
nullability: DECLARED_OUTPUT
return: i8?
- args:
- value: i16
nullability: DECLARED_OUTPUT
return: i16?
- args:
- value: i32
nullability: DECLARED_OUTPUT
return: i32?
- args:
- value: i64
nullability: DECLARED_OUTPUT
return: i64?
- args:
- value: fp32
nullability: DECLARED_OUTPUT
return: fp32?
- args:
- value: fp64
nullability: DECLARED_OUTPUT
return: fp64?
window_functions:
- name: "row_number"
description: "the number of the current row within its partition."
Expand Down

0 comments on commit 96b13d7

Please sign in to comment.