ES|QL conditional functions and expressions
Conditional functions return one of their arguments by evaluating in an if-else manner. ES|QL supports these conditional functions:
CASEReturns the value for the first condition that evaluates to true.
COALESCEReturns the first of its arguments that is not null.
GREATESTReturns the maximum value from multiple columns.
LEASTReturns the minimum value from multiple columns.
CLAMPClamps values to a specified minimum and maximum range.
CLAMP_MINClamps input values to a lower bound, raising any value below min to min.
CLAMP_MAXClamps input values to an upper bound, reducing any value above max to max.