Skip to content

Commit

Permalink
Merge pull request #271 from deemoliu/fix-docs-reference
Browse files Browse the repository at this point in the history
Fix references for distinctCountHLLMv and distinctCountBitmapMv
  • Loading branch information
kelseiv authored Dec 29, 2023
2 parents 7590893 + 49eb3ec commit 366ef44
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
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 |

0 comments on commit 366ef44

Please sign in to comment.