Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

DISTINCTCOUNTBITMAP

This section contains reference documentation for the DISTINCTCOUNTBITMAP function.

Returns the count of distinct row values in a group. This function is accurate for INT column, but approximate for other cases where hash codes are used in distinct counting and there may be hash collisions. For accurate distinct counting on all column types, see DISTINCTCOUNT.

Signature

DISTINCTCOUNTBITMAP(colName)

With advanced null handling enabled, Pinot skips null rows. Without advanced null handling, the column's configured default null value contributes to the bitmap. The function returns 0 when no non-null rows contribute.

Usage Examples

These examples are based on the Batch Quick Start.

select DISTINCTCOUNTBITMAP(league) AS value
from baseballStats 
value

7

select DISTINCTCOUNTBITMAP(teamID) AS value
from baseballStats 
value

148

Last updated

Was this helpful?