Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Applies to:
Databricks Runtime 18.1 and above
Returns the theta value (sampling rate) from a TupleSketch with double summaries.
Syntax
tuple_sketch_theta_double ( sketch )
Arguments
- sketch: A TupleSketch in binary format with double summaries.
Returns
A DOUBLE value between 0.0 and 1.0 representing the effective sampling rate of the sketch.
Notes
- Theta = 1.0 indicates the sketch has not been sampled (exact mode).
- Theta < 1.0 indicates the sketch has been probabilistically sampled.
Examples
> SELECT tuple_sketch_theta_double(tuple_sketch_agg_double(key, summary)) FROM VALUES (1, 1.0D), (2, 2.0D), (3, 3.0D) tab(key, summary);
1.0