-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add aggregate count functions with decimal return type (#670)
- Loading branch information
Showing
1 changed file
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
%YAML 1.2 | ||
--- | ||
aggregate_functions: | ||
- name: "count" | ||
description: Count a set of values. Result is returned as a decimal instead of i64. | ||
impls: | ||
- args: | ||
- name: x | ||
value: any | ||
options: | ||
overflow: | ||
values: [SILENT, SATURATE, ERROR] | ||
nullability: DECLARED_OUTPUT | ||
decomposable: MANY | ||
intermediate: decimal<38,0> | ||
return: decimal<38,0> | ||
- name: "count" | ||
description: "Count a set of records (not field referenced). Result is returned as a decimal instead of i64." | ||
impls: | ||
- options: | ||
overflow: | ||
values: [SILENT, SATURATE, ERROR] | ||
nullability: DECLARED_OUTPUT | ||
decomposable: MANY | ||
intermediate: decimal<38,0> | ||
return: decimal<38,0> | ||
- name: "approx_count_distinct" | ||
description: >- | ||
Calculates the approximate number of rows that contain distinct values of the expression argument using | ||
HyperLogLog. This function provides an alternative to the COUNT (DISTINCT expression) function, which | ||
returns the exact number of rows that contain distinct values of an expression. APPROX_COUNT_DISTINCT | ||
processes large amounts of data significantly faster than COUNT, with negligible deviation from the exact | ||
result. Result is returned as a decimal instead of i64. | ||
impls: | ||
- args: | ||
- name: x | ||
value: any | ||
nullability: DECLARED_OUTPUT | ||
decomposable: MANY | ||
intermediate: binary | ||
return: decimal<38,0> |