error()
Get the maximum relative error for a `uddsketch`
Since 1.0.0
Get the maximum relative error of a uddsketch. The correct (non-estimated) percentile falls within the range defined
by approx_percentile(sketch) +/- (approx_percentile(sketch) * error(sketch)).
Samples
Section titled “Samples”Calculate the maximum relative error when estimating percentiles using uddsketch.
SELECT error(uddsketch(data))FROM generate_series(0, 100) data;error-------0.001Arguments
Section titled “Arguments”The syntax is:
error( sketch UddSketch) RETURNS DOUBLE PRECISION| Name | Type | Default | Required | Description |
|---|---|---|---|---|
| sketch | UddSketch | - | ✔ | The uddsketch to determine the error of |
Returns
Section titled “Returns”| Column | Type | Description |
|---|---|---|
| error | DOUBLE PRECISION | The maximum relative error of any percentile estimate. |