Function datafusion::prelude::approx_distinct

source ยท
pub fn approx_distinct(expr: Expr) -> Expr
Expand description

Returns the approximate number of distinct input values. This function provides an approximation of count(DISTINCT x). Zero is returned if all input values are null. This function should produce a standard error of 0.81%, which is the standard deviation of the (approximately normal) error distribution over all possible sets. It does not guarantee an upper bound on the error for any specific input set.