Class FunctionUtils
java.lang.Object
org.elasticsearch.xpack.esql.expression.function.FunctionUtils
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA utility class to validate the type resolution of expressions before and after logical planning. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic IntegerlimitValue(Expression limitField, String sourceText) static ObjectqueryAsObject(Expression queryField, String sourceText) static StringqueryAsString(Expression queryField, String sourceText) static Expression.TypeResolutionresolveTypeLimit(Expression limitField, String sourceText, FunctionUtils.TypeResolutionValidator validator) We check that the limit is not null and that if it is a literal, it is a positive integer During postOptimizationVerification folding is already done, so we also verify that it is definitively a literalstatic Expression.TypeResolutionresolveTypeQuery(Expression queryField, String sourceText, FunctionUtils.TypeResolutionValidator validator) We check that the query is not null and that if it is a literal, it is a string During postOptimizationVerification folding is already done, so we also verify that it is definitively a literal
-
Constructor Details
-
FunctionUtils
public FunctionUtils()
-
-
Method Details
-
limitValue
-
resolveTypeLimit
public static Expression.TypeResolution resolveTypeLimit(Expression limitField, String sourceText, FunctionUtils.TypeResolutionValidator validator) We check that the limit is not null and that if it is a literal, it is a positive integer During postOptimizationVerification folding is already done, so we also verify that it is definitively a literal -
resolveTypeQuery
public static Expression.TypeResolution resolveTypeQuery(Expression queryField, String sourceText, FunctionUtils.TypeResolutionValidator validator) We check that the query is not null and that if it is a literal, it is a string During postOptimizationVerification folding is already done, so we also verify that it is definitively a literal -
queryAsObject
-
queryAsString
-