Lưu ý
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử đăng nhập hoặc thay đổi thư mục.
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử thay đổi thư mục.
Applies to:
Databricks Runtime 18.0 and later
Creates a KLL (Karnin-Lang-Liberty) sketch for approximate quantile estimation on single-precision floating-point data with configurable accuracy.
Syntax
kll_sketch_agg_float ( expr [, k] )
Arguments
expr: AFLOATexpression to aggregate.k: An optionalINTEGERliteral controlling sketch accuracy. Must be between 8 and 65535. The default is 200. Higher values provide better accuracy but use more memory.
Returns
A BINARY value containing the serialized KLL sketch for FLOAT data.
Notes
NULLvalues in expr are ignored during aggregation.- NaN values are handled according to IEEE 754 semantics.
- The sketch provides approximate quantiles with a confidence level of about 99%.
Examples
-- Create sketch from float values
> SELECT kll_sketch_agg_float(score) FROM VALUES (1.5), (2.3), (3.7) AS T(score)
[binary data]