Skip to content

Commit

Permalink
feat: define APPROX_COUNT_DISTINCT in new yaml for approximate aggreg…
Browse files Browse the repository at this point in the history
…ate functions
  • Loading branch information
James Taylor committed May 19, 2022
1 parent 296c266 commit 888c1f0
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions extensions/functions_aggregate_approx.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
%YAML 1.2
---
aggregate_functions:
- 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.
impls:
- args:
- value: any
nullability: DECLARED_OUTPUT
decomposable: MANY
intermediate: i64
return: i64

0 comments on commit 888c1f0

Please sign in to comment.