tdigest¶
Description¶
Convert a JSON string, an object, or a variant to tdigest, if possible.
The input must be of the following shape:
{"state":[1,2,4,1,6,2],"type":"tdigest","version":1}
More specifically, the input must contain:
- Exactly 3 keys 
- “state” key, with an array of numbers as its value 
- “type” key, with “tdigest” as its value 
- “version” key, with 1 as its value 
If the input is not tdigest-conforming, this function returns null.
Return type¶
tdigest of float64
Domain¶
This is a scalar function (calculates a single output value for a single input row.)
Categories¶
Usage¶
tdigest(value)
| Argument | Type | Optional | Repeatable | Restrictions | 
|---|---|---|---|---|
| value | string or object | no | no | none | 
Examples¶
make_col str_to_tdigest:tdigest(str)
Create a new column named str_to_tdigest, which contains the data in column
str, interpreted as tdigest.