All Implemented Interfaces:
NamedWriteable, Writeable, PostAnalysisVerificationAware, TelemetryAware, Resolvable, GeneratingPlan<CompoundOutputEval<UriParts>>, Streaming

public class UriParts extends CompoundOutputEval<UriParts>
The logical plan for the URI_PARTS command.
  • Field Details

  • Constructor Details

  • Method Details

    • createInitialInstance

      public static UriParts createInitialInstance(Source source, LogicalPlan child, Expression input, Attribute outputFieldPrefix)
      Use this static factory method for the initial creation of the logical plan, as it computes the output attributes. Subsequent instantiations (such as deserialization, child replacement, etc.) should use the constructors.
      Parameters:
      source - source of the command
      child - child plan
      input - input expression to base the computation on
      outputFieldPrefix - the prefix to be used for the output field names
      Returns:
      the logical plan
    • createNewInstance

      public UriParts createNewInstance(Source source, LogicalPlan child, Expression input, List<String> outputFieldNames, List<Attribute> outputFieldAttributes)
      Description copied from class: CompoundOutputEval
      Creates a new instance of the specific CompoundOutputEval subclass with the provided parameters. Subclasses should call their corresponding constructor with the provided arguments and the concrete evaluator instance.
      Specified by:
      createNewInstance in class CompoundOutputEval<UriParts>
      Parameters:
      source - the source information
      child - the child logical plan
      input - the input expression
      outputFieldNames - the output field names, used for the computation of the output attributes
      outputFieldAttributes - the output attributes
      Returns:
      a new instance of the specific CompoundOutputEval subclass
    • innerHashCode

      protected int innerHashCode()
      Specified by:
      innerHashCode in class CompoundOutputEval<UriParts>
    • innerEquals

      protected boolean innerEquals(CompoundOutputEval<?> other)
      Specified by:
      innerEquals in class CompoundOutputEval<UriParts>
    • getWriteableName

      public String getWriteableName()
    • telemetryLabel

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

      public void postAnalysisVerification(Failures failures)
      Description copied from interface: PostAnalysisVerificationAware
      Allows the implementer to validate itself. This usually involves checking its internal setup, which often means checking the parameters it received on construction: their data or syntactic type, class, their count, expressions' structure etc. The discovered failures are added to the given Failures object.

      It is often more useful to perform the checks as extended as it makes sense, over stopping at the first failure. This will allow the author to progress faster to a correct query.

      Example: the Filter class, which models the WHERE command, checks that the expression it filters on - condition - is of a Boolean or NULL type:

           
           @Override
           void postAnalysisVerification(Failures failures) {
                if (condition.dataType() != NULL && condition.dataType() != BOOLEAN) {
                    failures.add(fail(condition, "Condition expression needs to be boolean, found [{}]", condition.dataType()));
                }
           }
           
           
      Parameters:
      failures - the object to add failures to.