Del via


tuple_sketch_estimate_double function

Applies to: check marked yes Databricks Runtime 18.1 and above

Returns the estimated number of unique keys from a TupleSketch with double summaries.

Syntax

tuple_sketch_estimate_double ( sketch )

Arguments

  • sketch: A TupleSketch in binary format with double summaries.

Returns

A DOUBLE value representing the estimated distinct count of keys.

Error messages

Examples

> SELECT tuple_sketch_estimate_double(tuple_sketch_agg_double(key, summary)) FROM VALUES (1, 1.0D), (1, 2.0D), (2, 3.0D) tab(key, summary);
2.0