Class UnresolvedIpLocation
- All Implemented Interfaces:
NamedWriteable,Writeable,TelemetryAware,Resolvable,Unresolvable
IP_LOCATION command.
The output columns of IP_LOCATION depend on the IP database schema, which is only available through the
IpLocationService. To keep that service out of the parser, the parser emits this
unresolved node carrying only the syntax-level options; the ResolveIpLocation analyzer rule then reads the
pre-fetched database metadata from the AnalyzerContext and rewrites it into a
resolved IpLocation node (or leaves it unresolved with a specific message, which the verifier reports).
This node is never serialized: it is always resolved (or fails verification) on the coordinator before the plan is mapped to a
physical plan. It is therefore intentionally not registered as a NamedWriteable.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.xpack.esql.plan.logical.LogicalPlan
LogicalPlan.StageNested classes/interfaces inherited from class org.elasticsearch.xpack.esql.core.tree.Node
Node.NodeStringFormatNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
Fields inherited from class org.elasticsearch.xpack.esql.core.tree.Node
TO_STRING_MAX_LINES, TO_STRING_MAX_WIDTHFields inherited from interface org.elasticsearch.xpack.esql.core.capabilities.Unresolvable
UNRESOLVED_PREFIX -
Constructor Summary
ConstructorsConstructorDescriptionUnresolvedIpLocation(Source source, LogicalPlan child, Expression input, Attribute outputPrefix, String databaseFile, boolean firstOnly, List<String> properties) UnresolvedIpLocation(Source source, LogicalPlan child, Expression input, Attribute outputPrefix, String databaseFile, boolean firstOnly, List<String> properties, String unresolvedMessage) -
Method Summary
Modifier and TypeMethodDescriptionprotected AttributeSetOnly the input expression needs field resolution; the output prefix is a naming hint, not a column reference.booleanbooleanbooleaninthashCode()protected NodeInfo<UnresolvedIpLocation> info()Normally, you want to use one of the staticcreatemethods to implement this.input()replaceChild(LogicalPlan newChild) booleanresolved()NOTE: Any non-null return value from this method indicates that the item in question could not be resolved.withUnresolvedMessage(String message) Returns a copy of this node carrying a specific failure message, used by the resolution rule when the database or a requested property cannot be resolved.voidwriteTo(StreamOutput out) Methods inherited from class org.elasticsearch.xpack.esql.plan.logical.UnaryPlan
child, inputSet, output, outputSet, replaceChildrenMethods inherited from class org.elasticsearch.xpack.esql.plan.logical.LogicalPlan
analyzed, childrenResolved, optimized, preAnalyzed, preOptimized, setAnalyzed, setOptimized, setPreAnalyzed, setPreOptimizedMethods inherited from class org.elasticsearch.xpack.esql.plan.QueryPlan
computeExpressions, expressions, forEachExpression, forEachExpression, forEachExpressionDown, forEachExpressionUp, references, transformExpressionsDown, transformExpressionsDown, transformExpressionsOnly, transformExpressionsOnly, transformExpressionsOnlyUp, transformExpressionsUp, transformExpressionsUpMethods inherited from class org.elasticsearch.xpack.esql.core.tree.Node
allMatch, anyMatch, children, collect, collect, collect, collectFirstChildren, collectLeaves, doCollectFirst, forEachDown, forEachDown, forEachDownMayReturnEarly, forEachProperty, forEachPropertyDown, forEachPropertyOnly, forEachPropertyUp, forEachUp, forEachUp, nodeName, nodeProperties, nodeString, nodeString, propertiesToString, replaceChildrenSameSize, source, sourceLocation, sourceText, toString, toString, toString, transformChildren, transformChildren, transformDown, transformDown, transformDown, transformDown, transformDownSkipBranch, transformNodeProps, transformPropertiesDown, transformPropertiesOnly, transformPropertiesUp, transformUp, transformUp, transformUp
-
Constructor Details
-
UnresolvedIpLocation
public UnresolvedIpLocation(Source source, LogicalPlan child, Expression input, Attribute outputPrefix, String databaseFile, boolean firstOnly, @Nullable List<String> properties) -
UnresolvedIpLocation
public UnresolvedIpLocation(Source source, LogicalPlan child, Expression input, Attribute outputPrefix, String databaseFile, boolean firstOnly, @Nullable List<String> properties, String unresolvedMessage)
-
-
Method Details
-
input
-
outputPrefix
-
databaseFile
-
firstOnly
public boolean firstOnly() -
properties
-
withUnresolvedMessage
Returns a copy of this node carrying a specific failure message, used by the resolution rule when the database or a requested property cannot be resolved. The returned node stays unresolved so the verifier reports the message. -
computeReferences
Only the input expression needs field resolution; the output prefix is a naming hint, not a column reference. MirroringCompoundOutputEval, this excludes the prefix so it is neither requested from field-caps nor flagged as an unknown column while the command is still unresolved.- Overrides:
computeReferencesin classQueryPlan<LogicalPlan>
-
replaceChild
- Specified by:
replaceChildin classUnaryPlan
-
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<LogicalPlan>
-
resolved
public boolean resolved()- Specified by:
resolvedin interfaceResolvable- Specified by:
resolvedin interfaceUnresolvable- Overrides:
resolvedin classLogicalPlan
-
expressionsResolved
public boolean expressionsResolved()- Specified by:
expressionsResolvedin classLogicalPlan
-
unresolvedMessage
Description copied from interface:UnresolvableNOTE: Any non-null return value from this method indicates that the item in question could not be resolved.- Specified by:
unresolvedMessagein interfaceUnresolvable
-
telemetryLabel
- Specified by:
telemetryLabelin interfaceTelemetryAware- Returns:
- the label reported in the telemetry data. Only needs to be overwritten if the label doesn't match the class name.
-
writeTo
-
getWriteableName
- Specified by:
getWriteableNamein interfaceNamedWriteable
-
hashCode
public int hashCode() -
equals
-