Class SpatialWithin
java.lang.Object
org.elasticsearch.xpack.esql.core.tree.Node<Expression>
org.elasticsearch.xpack.esql.core.expression.Expression
org.elasticsearch.xpack.esql.core.expression.function.Function
org.elasticsearch.xpack.esql.core.expression.function.scalar.ScalarFunction
org.elasticsearch.xpack.esql.core.expression.function.scalar.BinaryScalarFunction
org.elasticsearch.xpack.esql.expression.function.scalar.spatial.BinarySpatialFunction
org.elasticsearch.xpack.esql.expression.function.scalar.spatial.SpatialRelatesFunction
org.elasticsearch.xpack.esql.expression.function.scalar.spatial.SpatialWithin
- All Implemented Interfaces:
NamedWriteable,Writeable,TranslationAware,Resolvable,EvaluatorMapper,SurrogateExpression
This is the primary class for supporting the function ST_WITHIN.
The bulk of the capabilities are within the parent class SpatialRelatesFunction,
which supports all the relations in the ShapeField.QueryRelation enum.
Here we simply wire the rules together specific to ST_WITHIN and QueryRelation.WITHIN.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.xpack.esql.expression.function.scalar.spatial.SpatialRelatesFunction
SpatialRelatesFunction.SpatialRelationsNested classes/interfaces inherited from class org.elasticsearch.xpack.esql.expression.function.scalar.spatial.BinarySpatialFunction
BinarySpatialFunction.BinarySpatialComparator<T>, BinarySpatialFunction.SpatialCrsType, BinarySpatialFunction.SpatialTypeResolverNested classes/interfaces inherited from class org.elasticsearch.xpack.esql.core.expression.Expression
Expression.TypeResolutionNested classes/interfaces inherited from interface org.elasticsearch.xpack.esql.evaluator.mapper.EvaluatorMapper
EvaluatorMapper.ToEvaluatorNested classes/interfaces inherited from interface org.elasticsearch.xpack.esql.capabilities.TranslationAware
TranslationAware.FinishedTranslatable, TranslationAware.SingleValueTranslationAware, TranslationAware.TranslatableNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final SpatialRelatesFunction.SpatialRelationsstatic final NamedWriteableRegistry.Entrystatic final SpatialRelatesFunction.SpatialRelationsFields inherited from class org.elasticsearch.xpack.esql.expression.function.scalar.spatial.BinarySpatialFunction
leftDocValues, rightDocValues, spatialTypeResolverFields inherited from class org.elasticsearch.xpack.esql.core.expression.function.scalar.ScalarFunction
MAX_BYTES_REF_RESULT_SIZEFields inherited from class org.elasticsearch.xpack.esql.core.tree.Node
TO_STRING_MAX_WIDTH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncrsType()protected SpatialRelatesFunction.SpatialRelationsThis exposes class-level static information within objects and should only be used for folding optimizationsprotected NodeInfo<? extends Expression> info()Normally, you want to use one of the staticcreatemethods to implement this.left()booleanprotected SpatialWithinreplaceChildren(Expression newLeft, Expression newRight) right()booleansource()To keep the number of evaluators to a minimum, we swap the arguments to get the CONTAINS relation.withDocValues(boolean foundLeft, boolean foundRight) Mark the function as expecting the specified fields to arrive as doc-values.Methods inherited from class org.elasticsearch.xpack.esql.expression.function.scalar.spatial.SpatialRelatesFunction
asQuery, dataType, fold, fold, foldGeoGrid, toEvaluator, translatableMethods inherited from class org.elasticsearch.xpack.esql.expression.function.scalar.spatial.BinarySpatialFunction
crsType, equals, hashCode, leftDocValues, resolveType, rightDocValues, setCrsType, spatialCRSCompatible, writeToMethods inherited from class org.elasticsearch.xpack.esql.core.expression.function.scalar.BinaryScalarFunction
foldable, left, replaceChildren, rightMethods inherited from class org.elasticsearch.xpack.esql.core.expression.function.Function
arguments, functionName, nodeString, nullableMethods inherited from class org.elasticsearch.xpack.esql.core.expression.Expression
canonical, canonicalize, childrenResolved, propertiesToString, references, resolved, semanticEquals, semanticHash, toString, typeResolvedMethods inherited from class org.elasticsearch.xpack.esql.core.tree.Node
anyMatch, children, collect, collect, collect, collectFirstChildren, collectLeaves, doCollectFirst, forEachDown, forEachDown, forEachDownMayReturnEarly, forEachProperty, forEachPropertyDown, forEachPropertyOnly, forEachPropertyUp, forEachUp, forEachUp, nodeName, nodeProperties, replaceChildrenSameSize, source, sourceLocation, sourceText, transformChildren, transformDown, transformDown, transformDown, transformNodeProps, transformPropertiesDown, transformPropertiesOnly, transformPropertiesUp, transformUp, transformUp, transformUpMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.xpack.esql.evaluator.mapper.EvaluatorMapper
foldMethods inherited from interface org.elasticsearch.xpack.esql.capabilities.TranslationAware
asLuceneQuery
-
Field Details
-
ENTRY
-
GEO
-
CARTESIAN
-
-
Constructor Details
-
SpatialWithin
-
-
Method Details
-
getWriteableName
- Specified by:
getWriteableNamein interfaceNamedWriteable
-
queryRelation
- Specified by:
queryRelationin classSpatialRelatesFunction
-
withDocValues
Description copied from class:BinarySpatialFunctionMark the function as expecting the specified fields to arrive as doc-values.- Specified by:
withDocValuesin classBinarySpatialFunction
-
replaceChildren
- Specified by:
replaceChildrenin classBinaryScalarFunction
-
info
Description copied from class:NodeNormally, you want to use one of the staticcreatemethods to implement this.For
QueryPlans, it is very important that the properties contain all of the expressions and references relevant to this node, and that all the properties are used in the provided constructor; otherwise query plan transformations likeQueryPlan#transformExpressionsOnly(Function)will not have an effect.- Specified by:
infoin classNode<Expression>
-
getSpatialRelations
Description copied from class:SpatialRelatesFunctionThis exposes class-level static information within objects and should only be used for folding optimizations- Specified by:
getSpatialRelationsin classSpatialRelatesFunction
-
surrogate
To keep the number of evaluators to a minimum, we swap the arguments to get the CONTAINS relation. This also makes other optimizations, like lucene-pushdown, simpler to develop.- Specified by:
surrogatein interfaceSurrogateExpression- Overrides:
surrogatein classSpatialRelatesFunction
-
source
Source source() -
left
Expression left() -
right
Expression right() -
crsType
BinarySpatialFunction.SpatialCrsType crsType() -
leftDocValues
boolean leftDocValues() -
rightDocValues
boolean rightDocValues()
-