Skip to content

Commit

Permalink
feat: add aggregate function min/max support (#219)
Browse files Browse the repository at this point in the history
  • Loading branch information
weijietong authored Jun 7, 2022
1 parent 43be00a commit 48b6b12
Show file tree
Hide file tree
Showing 2 changed files with 96 additions and 0 deletions.
78 changes: 78 additions & 0 deletions extensions/functions_arithmetic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -276,3 +276,81 @@ aggregate_functions:
decomposable: MANY
intermediate: "STRUCT<fp64,i64>"
return: fp64?
- name: "min"
description: Min a set of values.
impls:
- args:
- value: i8
nullability: DECLARED_OUTPUT
decomposable: MANY
intermediate: i8?
return: i8?
- args:
- value: i16
nullability: DECLARED_OUTPUT
decomposable: MANY
intermediate: i16?
return: i16?
- args:
- value: i32
nullability: DECLARED_OUTPUT
decomposable: MANY
intermediate: i32?
return: i32?
- args:
- value: i64
nullability: DECLARED_OUTPUT
decomposable: MANY
intermediate: i64?
return: i64?
- args:
- value: fp32
nullability: DECLARED_OUTPUT
decomposable: MANY
intermediate: fp32?
return: fp32?
- args:
- value: fp64
nullability: DECLARED_OUTPUT
decomposable: MANY
intermediate: fp64?
return: fp64?
- name: "max"
description: Max a set of values.
impls:
- args:
- value: i8
nullability: DECLARED_OUTPUT
decomposable: MANY
intermediate: i8?
return: i8?
- args:
- value: i16
nullability: DECLARED_OUTPUT
decomposable: MANY
intermediate: i16?
return: i16?
- args:
- value: i32
nullability: DECLARED_OUTPUT
decomposable: MANY
intermediate: i32?
return: i32?
- args:
- value: i64
nullability: DECLARED_OUTPUT
decomposable: MANY
intermediate: i64?
return: i64?
- args:
- value: fp32
nullability: DECLARED_OUTPUT
decomposable: MANY
intermediate: fp32?
return: fp32?
- args:
- value: fp64
nullability: DECLARED_OUTPUT
decomposable: MANY
intermediate: fp64?
return: fp64?
18 changes: 18 additions & 0 deletions extensions/functions_arithmetic_decimal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,21 @@ aggregate_functions:
decomposable: MANY
intermediate: "STRUCT<DECIMAL<38,S>,i64>"
return: "DECIMAL<38,S>"
- name: "min"
description: Min a set of values.
impls:
- args:
- value: "DECIMAL<P, S>"
nullability: DECLARED_OUTPUT
decomposable: MANY
intermediate: "DECIMAL<P, S>?"
return: "DECIMAL<P, S>?"
- name: "max"
description: Max a set of values.
impls:
- args:
- value: "DECIMAL<P,S>"
nullability: DECLARED_OUTPUT
decomposable: MANY
intermediate: "DECIMAL<P, S>?"
return: "DECIMAL<P, S>?"

0 comments on commit 48b6b12

Please sign in to comment.