Function Description
approx_top_k_estimate(state, k) Returns top k items with their frequency. `k` An optional INTEGER literal greater than 0. If k is not specified, it defaults to 5.
hll_sketch_estimate(expr) Returns the estimated number of unique values given the binary representation of a Datasketches HllSketch.
hll_union(first, second, allowDifferentLgConfigK) Merges two binary representations of Datasketches HllSketch objects, using a Datasketches Union object. Set allowDifferentLgConfigK to true to allow unions of sketches with different lgConfigK values (defaults to false).
kll_sketch_get_n_bigint(expr) Returns the number of items collected in the sketch.
kll_sketch_get_n_double(expr) Returns the number of items collected in the sketch.
kll_sketch_get_n_float(expr) Returns the number of items collected in the sketch.
kll_sketch_get_quantile_bigint(left, right) Extracts a single value from the quantiles sketch representing the desired quantile given the input rank. The desired quantile can either be a single value or an array. In the latter case, the function will return an array of results of equal length to the input array.
kll_sketch_get_quantile_double(left, right) Extracts a single value from the quantiles sketch representing the desired quantile given the input rank. The desired quantile can either be a single value or an array. In the latter case, the function will return an array of results of equal length to the input array.
kll_sketch_get_quantile_float(left, right) Extracts a single value from the quantiles sketch representing the desired quantile given the input rank. The desired quantile can either be a single value or an array. In the latter case, the function will return an array of results of equal length to the input array.
kll_sketch_get_rank_bigint(left, right) Extracts a single value from the quantiles sketch representing the desired rank given the input quantile. The desired rank can either be a single value or an array. In the latter case, the function will return an array of results of equal length to the input array.
kll_sketch_get_rank_double(left, right) Extracts a single value from the quantiles sketch representing the desired rank given the input quantile. The desired rank can either be a single value or an array. In the latter case, the function will return an array of results of equal length to the input array.
kll_sketch_get_rank_float(left, right) Extracts a single value from the quantiles sketch representing the desired rank given the input quantile. The desired rank can either be a single value or an array. In the latter case, the function will return an array of results of equal length to the input array.
kll_sketch_merge_bigint(left, right) Merges two sketch buffers together into one.
kll_sketch_merge_double(left, right) Merges two sketch buffers together into one.
kll_sketch_merge_float(left, right) Merges two sketch buffers together into one.
kll_sketch_to_string_bigint(expr) Returns human readable summary information about this sketch.
kll_sketch_to_string_double(expr) Returns human readable summary information about this sketch.
kll_sketch_to_string_float(expr) Returns human readable summary information about this sketch.
theta_difference(first, second) Subtracts two binary representations of Datasketches ThetaSketch objects from two input columns using a ThetaSketch AnotB object.
theta_intersection(first, second) Intersects two binary representations of Datasketches ThetaSketch objects from two input columns using a ThetaSketch Intersect object.
theta_sketch_estimate(expr) Returns the estimated number of unique values given the binary representation of a Datasketches ThetaSketch.
theta_union(first, second, lgNomEntries) Merges two binary representations of Datasketches ThetaSketch objects using a ThetaSketch Union object. Users can set lgNomEntries to a value between 4 and 26 to find the union of sketches with different union buffer size values (defaults to 12).
tuple_difference_double(tupleSketch1, tupleSketch2) Subtracts two binary representations of Datasketches TupleSketch objects with double summary data type using a TupleSketch AnotB object. Returns elements in the first sketch that are not in the second sketch.
tuple_difference_integer(tupleSketch1, tupleSketch2) Subtracts two binary representations of Datasketches TupleSketch objects with integer summary data type using a TupleSketch AnotB object. Returns elements in the first sketch that are not in the second sketch.
tuple_difference_theta_double(tupleSketch, thetaSketch) Subtracts the binary representation of a Datasketches ThetaSketch from a TupleSketch with double summary data type using a TupleSketch AnotB object. Returns elements in the TupleSketch that are not in the ThetaSketch.
tuple_difference_theta_integer(tupleSketch, thetaSketch) Subtracts the binary representation of a Datasketches ThetaSketch from a TupleSketch with integer summary data type using a TupleSketch AnotB object. Returns elements in the TupleSketch that are not in the ThetaSketch.
tuple_intersection_double(tupleSketch1, tupleSketch2, mode) Intersects two binary representations of Datasketches TupleSketch objects with double summary data type using a TupleSketch Intersection object. Users can set mode to 'sum', 'min', 'max', or 'alwaysone' (defaults to 'sum').
tuple_intersection_integer(tupleSketch1, tupleSketch2, mode) Intersects two binary representations of Datasketches TupleSketch objects with integer summary data type using a TupleSketch Intersection object. Users can set mode to 'sum', 'min', 'max', or 'alwaysone' (defaults to 'sum').
tuple_intersection_theta_double(tupleSketch, thetaSketch, mode) Intersects the binary representation of a Datasketches TupleSketch with double summary data type with the binary representation of a Datasketches ThetaSketch using a TupleSketch Intersection object. The ThetaSketch entries are assigned a default double summary value based on the mode: 0.0 for 'sum' mode, +Infinity for 'min' mode, -Infinity for 'max' mode, or 1.0 for 'alwaysone' mode. Users can set mode to 'sum', 'min', 'max', or 'alwaysone' (defaults to 'sum').
tuple_intersection_theta_integer(tupleSketch, thetaSketch, mode) Intersects the binary representation of a Datasketches TupleSketch with integer summary data type with the binary representation of a Datasketches ThetaSketch using a TupleSketch Intersection object. The ThetaSketch entries are assigned a default integer summary value based on the mode: 0 for 'sum' mode, Integer.MAX_VALUE for 'min' mode, Integer.MIN_VALUE for 'max' mode, or 1 for 'alwaysone' mode. Users can set mode to 'sum', 'min', 'max', or 'alwaysone' (defaults to 'sum').
tuple_sketch_estimate_double(child) Returns the estimated number of unique values given the binary representation of a Datasketches TupleSketch. The sketch's summary type must be a double.
tuple_sketch_estimate_integer(child) Returns the estimated number of unique values given the binary representation of a Datasketches TupleSketch. The sketch's summary type must be an integer.
tuple_sketch_summary_double(child, mode) Aggregates the summary values from a double summary type Datasketches TupleSketch. The mode can be 'sum', 'min', 'max', or 'alwaysone' (defaults to 'sum').
tuple_sketch_summary_integer(child, mode) Aggregates the summary values from a integer summary type Datasketches TupleSketch. The mode can be 'sum', 'min', 'max', or 'alwaysone' (defaults to 'sum').
tuple_sketch_theta_double(child) Returns the theta value (sampling rate) from a Datasketches TupleSketch. The theta value represents the effective sampling rate of the sketch, between 0.0 and 1.0. The sketch's summary type must be a double.
tuple_sketch_theta_integer(child) Returns the theta value (sampling rate) from a Datasketches TupleSketch. The theta value represents the effective sampling rate of the sketch, between 0.0 and 1.0. The sketch's summary type must be an integer.
tuple_union_double(tupleSketch1, tupleSketch2, lgNomEntries, mode) Merges two binary representations of Datasketches TupleSketch objects with double summary data type using a TupleSketch Union object. Users can set lgNomEntries to a value between 4 and 26 (defaults to 12) and mode to 'sum', 'min', 'max', or 'alwaysone' (defaults to 'sum').
tuple_union_integer(tupleSketch1, tupleSketch2, lgNomEntries, mode) Merges two binary representations of Datasketches TupleSketch objects with integer summary data type using a TupleSketch Union object. Users can set lgNomEntries to a value between 4 and 26 (defaults to 12) and mode to 'sum', 'min', 'max', or 'alwaysone' (defaults to 'sum').
tuple_union_theta_double(tupleSketch, thetaSketch, lgNomEntries, mode) Merges the binary representation of a Datasketches TupleSketch with double summary data type with the binary representation of a Datasketches ThetaSketch using a TupleSketch Union object. The ThetaSketch entries are assigned a default double summary value based on the mode: 0.0 for 'sum' mode, +Infinity for 'min' mode, -Infinity for 'max' mode, or 1.0 for 'alwaysone' mode. Users can set lgNomEntries to a value between 4 and 26 (defaults to 12) and mode to 'sum', 'min', 'max', or 'alwaysone' (defaults to 'sum').
tuple_union_theta_integer(tupleSketch, thetaSketch, lgNomEntries, mode) Merges the binary representation of a Datasketches TupleSketch with integer summary data type with the binary representation of a Datasketches ThetaSketch using a TupleSketch Union object. The ThetaSketch entries are assigned a default integer summary value based on the mode: 0 for 'sum' mode, Integer.MAX_VALUE for 'min' mode, Integer.MIN_VALUE for 'max' mode, or 1 for 'alwaysone' mode. Users can set lgNomEntries to a value between 4 and 26 (defaults to 12) and mode to 'sum', 'min', 'max', or 'alwaysone' (defaults to 'sum').