-
Notifications
You must be signed in to change notification settings - Fork 158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add any_value aggregate function #321
Conversation
70c6851
to
eadc4fb
Compare
@jvanstraten I updated the PR. |
Sorry, I don't know why I didn't notice this before, but there's no reason for this to be limited to numeric types. It can just be |
@jvanstraten updated the PR. |
extensions/functions_arithmetic.yaml
Outdated
|
||
- name: "any_value" | ||
description: > | ||
Selects an arbitrary value from a group of values. | ||
|
||
If the input is empty, the function returns null. | ||
impls: | ||
- args: | ||
- name: x | ||
value: i8 | ||
nullability: DECLARED_OUTPUT | ||
return: i8? | ||
- args: | ||
- name: x | ||
value: i16 | ||
nullability: DECLARED_OUTPUT | ||
return: i16? | ||
- args: | ||
- name: x | ||
value: i32 | ||
nullability: DECLARED_OUTPUT | ||
return: i32? | ||
- args: | ||
- name: x | ||
value: i64 | ||
nullability: DECLARED_OUTPUT | ||
return: i64? | ||
- args: | ||
- name: x | ||
value: fp32 | ||
nullability: DECLARED_OUTPUT | ||
return: fp32? | ||
- args: | ||
- name: x | ||
value: fp64 | ||
nullability: DECLARED_OUTPUT | ||
return: fp64? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is completely covered by the f(any) -> any?
variant, and it isn't really an arithmetic function to begin with. So why is this still here?
750b950
to
3cd25c6
Compare
@jvanstraten updated the PR. Is it okay now? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, LGTM now, I think.
This PR adds
any_value
aggregate function.