Skip to main content
Aggregate function that unions serialized Apache DataSketches Theta sketches (VARBINARY) across rows and returns a single serialized compact sketch. Input is a column of compact theta sketches from any source: built via ds_theta_accumulate, produced by the pairwise scalar set ops ds_theta_union / ds_theta_intersect / ds_theta_a_not_b, or loaded externally as VARBINARY from Parquet/Iceberg. The on-wire format is the standard Apache DataSketches C++ compact theta serialization, so result sketches interoperate with any other Apache DataSketches implementation that uses the default hash seed.

Syntax

  • sketch: a VARBINARY column of compact theta sketches.

Examples

Keywords

DS_THETA_COMBINE, DS_THETA_ACCUMULATE, DS_THETA_ESTIMATE, DS_THETA_COUNT_DISTINCT