Skip to content
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

Fix references for distinctCountHLLMv and distinctCountBitmapMv #271

Merged
merged 3 commits into from
Dec 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 15 additions & 5 deletions configuration-reference/functions/distinctcountbitmapmv.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,37 @@
---
description: >-
This section contains reference documentation for the DISTINCTCOUNTHLLMV
function.
This section contains reference documentation for the DISTINCTCOUNTBITMAPMV
function.
---

# DISTINCTCOUNTBITMAPMV

Returns an approximate distinct count using HyperLogLog in a group
Returns the count of distinct row values in a group. This function is accurate for an INT or dictionary encoded column, but approximate for other cases where hash codes are used in distinct counting and there may be hash collision.

## Signature

> DISTINCTCOUNTHLLMV(colName)
> DISTINCTCOUNTBITMAPMV(colName)

## Usage Examples

These examples are based on the [Hybrid Quick Start](../../basics/getting-started/quick-start.md#hybrid).

```sql
select DISTINCTCOUNTHLLMV(DivLongestGTimes) AS value
select DISTINCTCOUNTBITMAPMV(DivLongestGTimes) AS value
from airlineStats
where arraylength(DivLongestGTimes) > 1
```

| value |
| ----- |
| 34 |

```sql
select DISTINCTCOUNTBITMAPMV(DivTailNums) AS value
from airlineStats
where arraylength(DivTailNums) > 1
```

| value |
| ----- |
| 2 |
20 changes: 5 additions & 15 deletions configuration-reference/functions/distinctcounthllmv.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,27 @@
---
description: >-
This section contains reference documentation for the DISTINCTCOUNTBITMAPMV
function.
This section contains reference documentation for the DISTINCTCOUNTHLLMV
function.
---

# DISTINCTCOUNTHLLMV

Returns the count of distinct row values in a group. This function is accurate for INT or dictionary encoded column, but approximate for other cases where hash codes are used in distinct counting and there may be hash collision.
Returns an approximate distinct count using HyperLogLog in a group.

## Signature

> DISTINCTCOUNTBITMAPMV(colName)
> DISTINCTCOUNTHLLMV(colName)

## Usage Examples

These examples are based on the [Hybrid Quick Start](../../basics/getting-started/quick-start.md#hybrid).

```sql
select DISTINCTCOUNTBITMAPMV(DivLongestGTimes) AS value
select DISTINCTCOUNTHLLMV(DivLongestGTimes) AS value
from airlineStats
where arraylength(DivLongestGTimes) > 1
```

| value |
| ----- |
| 34 |

```sql
select DISTINCTCOUNTBITMAPMV(DivTailNums) AS value
from airlineStats
where arraylength(DivTailNums) > 1
```

| value |
| ----- |
| 2 |