Class PromqlFoldingUtils
java.lang.Object
org.elasticsearch.xpack.esql.parser.promql.PromqlFoldingUtils
Folds scalar PromQL arithmetic and comparisons at parse time.
Supported operands: - number op number: evaluated as double - duration op duration: only addition and subtraction - duration op number: duration is converted to seconds, evaluated, then converted back - number op duration: only supported where PromQL duration semantics are well-defined
-
Method Summary
-
Method Details
-
evaluate
public static Object evaluate(Source source, Object left, Object right, VectorBinaryArithmetic.ArithmeticOp op) -
evaluate
public static boolean evaluate(Source source, Object left, Object right, VectorBinaryComparison.ComparisonOp op)
-