Class MvContains
- All Implemented Interfaces:
NamedWriteable,Writeable,Resolvable,EvaluatorMapper
Given Set A = {"a","b","c"} and Set B = {"b","c"}, the relationship between first (row) and second (column) arguments is:
- A, B ⇒ true (A ⊆ B)
- B, A ⇒ false (A ⊈ B)
- A, A ⇒ true (A ≡ A)
- B, B ⇒ true (B ≡ B)
- A, null ⇒ true (B ⊆ ∅)
- null, A ⇒ false (∅ ⊈ B)
- B, null ⇒ true (B ⊆ ∅)
- null, B ⇒ false (∅ ⊈ B)
- null, null ⇒ true (∅ ≡ ∅)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classEvaluator that always returns true for all values in the block (~column)static classCurrentlyEvaluatorImplementergenerates: if (allBlocksAreNulls) { result.appendNull(); continue position; } when all params are null, this violates our contract of always returning a boolean.static classCurrentlyEvaluatorImplementergenerates: if (allBlocksAreNulls) { result.appendNull(); continue position; } when all params are null, this violates our contract of always returning a boolean.static classCurrentlyEvaluatorImplementergenerates: if (allBlocksAreNulls) { result.appendNull(); continue position; } when all params are null, this violates our contract of always returning a boolean.static classCurrentlyEvaluatorImplementergenerates: if (allBlocksAreNulls) { result.appendNull(); continue position; } when all params are null, this violates our contract of always returning a boolean.static classCurrentlyEvaluatorImplementergenerates: if (allBlocksAreNulls) { result.appendNull(); continue position; } when all params are null, this violates our contract of always returning a boolean.Nested 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.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsFields inherited from class org.elasticsearch.xpack.esql.core.expression.function.scalar.ScalarFunction
MAX_BYTES_REF_RESULT_SIZE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondataType()fold(FoldContext ctx) protected NodeInfo<? extends Expression> info()nullable()protected MvContainsreplaceChildren(Expression newLeft, Expression newRight) protected Expression.TypeResolutiontoEvaluator(EvaluatorMapper.ToEvaluator toEvaluator) Convert this into anEvalOperator.ExpressionEvaluator.Methods inherited from class org.elasticsearch.xpack.esql.core.expression.function.scalar.BinaryScalarFunction
foldable, left, replaceChildren, right, writeToMethods inherited from class org.elasticsearch.xpack.esql.core.expression.function.Function
arguments, equals, functionName, hashCode, nodeStringMethods 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, 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
fold
-
Field Details
-
ENTRY
-
-
Constructor Details
-
MvContains
-
-
Method Details
-
getWriteableName
- Specified by:
getWriteableNamein interfaceNamedWriteable
-
resolveType
- Overrides:
resolveTypein classExpression
-
dataType
- Specified by:
dataTypein classExpression
-
nullable
-
replaceChildren
- Specified by:
replaceChildrenin classBinaryScalarFunction
-
info
- Specified by:
infoin classNode<Expression>
-
fold
- Overrides:
foldin classExpression
-
toEvaluator
public EvalOperator.ExpressionEvaluator.Factory toEvaluator(EvaluatorMapper.ToEvaluator toEvaluator) Description copied from interface:EvaluatorMapperConvert 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.- Specified by:
toEvaluatorin interfaceEvaluatorMapper
-