Interface EvaluatorMapper
- All Known Implementing Classes:
Abs,AbstractConvertFunction,AbstractHashFunction,AbstractMultivalueFunction,Acos,Add,Asin,Atan,Atan2,BitLength,Bucket,ByteLength,Case,Cbrt,Ceil,ChangeCase,CIDRMatch,Coalesce,Concat,CopySign,Cos,Cosh,DateDiff,DateExtract,DateFormat,DateParse,DateTimeArithmeticOperation,DateTrunc,Delay,Div,EndsWith,Equals,EsqlArithmeticOperation,EsqlBinaryComparison,EsqlConfigurationFunction,EsqlScalarFunction,Exp,Floor,FoldablesConvertFunction,FromAggregateMetricDouble,FromBase64,FullTextFunction,GreaterThan,GreaterThanOrEqual,Greatest,GroupingFunction.EvaluatableGroupingFunction,Hash,Hypot,In,IpPrefix,IsNotNull,IsNull,Knn,Kql,Least,Left,Length,LessThan,LessThanOrEqual,Locate,Log,Log10,LTrim,Match,MatchOperator,MatchPhrase,Md5,Mod,Mul,MultiMatch,MvAppend,MvAvg,MvConcat,MvCount,MvDedupe,MvFirst,MvLast,MvMax,MvMedian,MvMedianAbsoluteDeviation,MvMin,MvPercentile,MvPSeriesWeightedSum,MvSlice,MvSort,MvSum,MvZip,Neg,Not,NotEquals,Now,Pow,QueryString,Repeat,Replace,Reverse,Right,RLike,Round,RoundTo,RTrim,Scalb,Sha1,Sha256,Signum,Sin,Sinh,Space,SpatialContains,SpatialDisjoint,SpatialIntersects,SpatialRelatesFunction,SpatialWithin,Split,Sqrt,StartsWith,StDistance,StEnvelope,StGeohash,StGeohashToLong,StGeohashToString,StGeohex,StGeohexToLong,StGeohexToString,StGeotile,StGeotileToLong,StGeotileToString,StX,StXMax,StXMin,StY,StYMax,StYMin,Sub,Substring,Tan,Tanh,Term,ToAggregateMetricDouble,ToBase64,ToBoolean,ToCartesianPoint,ToCartesianShape,ToDateNanos,ToDatePeriod,ToDatetime,ToDegrees,ToDouble,ToGeoPoint,ToGeoShape,ToInteger,ToIp,ToIpLeadingZerosDecimal,ToIpLeadingZerosOctal,ToIpLeadingZerosRejected,ToLong,ToLower,ToRadians,ToString,ToTimeDuration,ToUnsignedLong,ToUpper,ToVersion,Trim,UnaryScalarFunction,WildcardLike,WildcardLikeList
EvalOperator.ExpressionEvaluator.-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptiondefault Objectfold(Source source, FoldContext ctx) Fold usingtoEvaluator(org.elasticsearch.xpack.esql.evaluator.mapper.EvaluatorMapper.ToEvaluator)so you don't need a "by hand" implementation ofExpression.fold(org.elasticsearch.xpack.esql.core.expression.FoldContext).toEvaluator(EvaluatorMapper.ToEvaluator toEvaluator) Convert this into anEvalOperator.ExpressionEvaluator.
-
Method Details
-
toEvaluator
Convert this into anEvalOperator.ExpressionEvaluator.Note for implementors: If you are implementing this function, you should call the passed-in lambda on your children, after doing any other manipulation (casting, etc.) necessary.
Note for Callers: If you are attempting to call this method, and you have an
Expressionand aLayout, you likely want to callEvalMapper.toEvaluator(org.elasticsearch.xpack.esql.core.expression.FoldContext, org.elasticsearch.xpack.esql.core.expression.Expression, org.elasticsearch.xpack.esql.planner.Layout)instead. On the other hand, if you already have something that looks like the parameter for this method, you should call this method with that function.Build an
EvalOperator.ExpressionEvaluator.Factoryfor the tree of expressions rooted at this node. This is only guaranteed to return a sensible evaluator if this node has a valid type. If this node is a subclass ofExpressionthen "valid type" means thatExpression.typeResolved()returns a non-error resolution. If Expression.typeResolved() returns an error then this method may throw. Or return an evaluator that produces garbage. Or return an evaluator that throws when run. -
fold
Fold usingtoEvaluator(org.elasticsearch.xpack.esql.evaluator.mapper.EvaluatorMapper.ToEvaluator)so you don't need a "by hand" implementation ofExpression.fold(org.elasticsearch.xpack.esql.core.expression.FoldContext).
-