Class UnresolvedIpLocation

All Implemented Interfaces:
NamedWriteable, Writeable, TelemetryAware, Resolvable, Unresolvable

public class UnresolvedIpLocation extends UnaryPlan implements Unresolvable, TelemetryAware
Transient logical plan node produced by the parser for the 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.

  • Constructor Details

  • Method Details

    • input

      public Expression input()
    • outputPrefix

      public Attribute outputPrefix()
    • databaseFile

      public String databaseFile()
    • firstOnly

      public boolean firstOnly()
    • properties

      @Nullable public List<String> properties()
    • withUnresolvedMessage

      public UnresolvedIpLocation 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. The returned node stays unresolved so the verifier reports the message.
    • computeReferences

      protected AttributeSet computeReferences()
      Only the input expression needs field resolution; the output prefix is a naming hint, not a column reference. Mirroring CompoundOutputEval, 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:
      computeReferences in class QueryPlan<LogicalPlan>
    • replaceChild

      public UnresolvedIpLocation replaceChild(LogicalPlan newChild)
      Specified by:
      replaceChild in class UnaryPlan
    • info

      protected NodeInfo<UnresolvedIpLocation> info()
      Description copied from class: Node
      Normally, you want to use one of the static create methods 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 like QueryPlan#transformExpressionsOnly(Function) will not have an effect.

      Specified by:
      info in class Node<LogicalPlan>
    • resolved

      public boolean resolved()
      Specified by:
      resolved in interface Resolvable
      Specified by:
      resolved in interface Unresolvable
      Overrides:
      resolved in class LogicalPlan
    • expressionsResolved

      public boolean expressionsResolved()
      Specified by:
      expressionsResolved in class LogicalPlan
    • unresolvedMessage

      public String unresolvedMessage()
      Description copied from interface: Unresolvable
      NOTE: Any non-null return value from this method indicates that the item in question could not be resolved.
      Specified by:
      unresolvedMessage in interface Unresolvable
    • telemetryLabel

      public String telemetryLabel()
      Specified by:
      telemetryLabel in interface TelemetryAware
      Returns:
      the label reported in the telemetry data. Only needs to be overwritten if the label doesn't match the class name.
    • writeTo

      public void writeTo(StreamOutput out)
      Specified by:
      writeTo in interface Writeable
    • getWriteableName

      public String getWriteableName()
      Specified by:
      getWriteableName in interface NamedWriteable
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class UnaryPlan
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class UnaryPlan