public class ArrayQuantileExprMacro extends Object implements ExprMacroTable.ExprMacro
array_quantile(array, rank). The requested quantile is given by "rank", which must be from 0 to 1,
inclusive: 0 is the minimum, 1 is the maximum. Null values in the input array are ignored.
Returns Double.NaN if the requested quantile is below 0 or above 1. Returns Double.NaN if the
input array is numeric, yet contains no nonnull elements. Returns null if the input is not a numeric array at all.
If the requested quantile falls between two elements of the input array, the result is a linear interpolation of
the two closest values. According to Wikipedia (https://en.wikipedia.org/wiki/Quantile), the interpolation algorithm
we're using is the default method in R, NumPy, and Julia, and matches Excel's PERCENTILE.INC function.| Constructor and Description |
|---|
ArrayQuantileExprMacro() |
| Modifier and Type | Method and Description |
|---|---|
Expr |
apply(List<Expr> args) |
String |
name()
Name of the function
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprocessingFailed, validationFailed, validationFailed, validationHelperCheckAnyOfArgumentCount, validationHelperCheckArgIsLiteral, validationHelperCheckArgumentCount, validationHelperCheckArgumentCount, validationHelperCheckArgumentRange, validationHelperCheckLambaArgumentCount, validationHelperCheckMinArgumentCount, validationHelperCheckMinArgumentCountpublic static final String FN_NAME
public String name()
NamedFunctionname in interface NamedFunctionpublic Expr apply(List<Expr> args)
apply in interface ExprMacroTable.ExprMacroCopyright © 2011–2023 The Apache Software Foundation. All rights reserved.