Class SpatialContains
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.SpatialContains
- All Implemented Interfaces:
NamedWriteable,Writeable,TranslationAware,Resolvable,EvaluatorMapper
This is the primary class for supporting the function ST_CONTAINS.
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_CONTAINS and QueryRelation.CONTAINS.
-
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.SpatialCrsTypeNested 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.SingleValueTranslationAwareNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.elasticsearch.xpack.esql.expression.function.scalar.spatial.SpatialContains.SpatialRelationsContainsstatic final NamedWriteableRegistry.Entrystatic final org.elasticsearch.xpack.esql.expression.function.scalar.spatial.SpatialContains.SpatialRelationsContainsFields inherited from class org.elasticsearch.xpack.esql.expression.function.scalar.spatial.BinarySpatialFunction
leftDocValues, rightDocValues -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncrsType()fold(FoldContext ctx) protected NodeInfo<? extends Expression> info()left()booleanprotected SpatialContainsreplaceChildren(Expression newLeft, Expression newRight) right()booleansource()To keep the number of evaluators to a minimum, we swap the arguments to get the WITHIN 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, 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, collectFirstChildren, collectLeaves, doCollectFirst, forEachDown, forEachDown, forEachProperty, forEachPropertyDown, forEachPropertyOnly, forEachPropertyUp, forEachUp, forEachUp, nodeName, nodeProperties, replaceChildrenSameSize, source, sourceLocation, sourceText, transformChildren, transformDown, transformDown, transformNodeProps, transformPropertiesDown, transformPropertiesOnly, transformPropertiesUp, 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
fold
-
Field Details
-
ENTRY
-
GEO
public static final org.elasticsearch.xpack.esql.expression.function.scalar.spatial.SpatialContains.SpatialRelationsContains GEO -
CARTESIAN
public static final org.elasticsearch.xpack.esql.expression.function.scalar.spatial.SpatialContains.SpatialRelationsContains CARTESIAN
-
-
Constructor Details
-
SpatialContains
-
-
Method Details
-
getWriteableName
-
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
- Specified by:
infoin classNode<Expression>
-
fold
- Overrides:
foldin classExpression
-
surrogate
To keep the number of evaluators to a minimum, we swap the arguments to get the WITHIN relation. This also makes other optimizations, like lucene-pushdown, simpler to develop.- Overrides:
surrogatein classSpatialRelatesFunction
-
source
Source source() -
left
Expression left() -
right
Expression right() -
crsType
BinarySpatialFunction.SpatialCrsType crsType() -
leftDocValues
boolean leftDocValues() -
rightDocValues
boolean rightDocValues()
-