> SELECT any_value(col, true) FROM VALUES (NULL), (5), (20) AS tab(col) Īpprox_count_distinct(expr) - Returns the estimated cardinality by HyperLogLog++. > SELECT any_value(col) FROM VALUES (NULL), (5), (20) AS tab(col) If isIgnoreNull is true, returns only non-null values.Įxamples: > SELECT any_value(col) FROM VALUES (10), (5), (20) AS tab(col) > SELECT any(col) FROM VALUES (false), (false), (NULL) AS tab(col) Īny_value(expr) - Returns some value of expr for a group of rows. > SELECT any(col) FROM VALUES (NULL), (true), (false) AS tab(col) > SELECT aggregate(array(1, 2, 3), 0, (acc, x) -> acc + x, acc -> acc * 10) Īny(expr) - Returns true if at least one value of expr is true.Įxamples: > SELECT any(col) FROM VALUES (true), (false), (false) AS tab(col) Into the final result by applying a finish function.Įxamples: > SELECT aggregate(array(1, 2, 3), 0, (acc, x) -> acc + x) > SELECT base64(aes_encrypt('Spark SQL', '1234567890abcdef', 'ECB', 'PKCS')) Īggregate(expr, start, merge, finish) - Applies a binary operator to an initial state and allĮlements in the array, and reduces this to a single state.
0 Comments
Leave a Reply. |