Class UnresolvedNamePattern

All Implemented Interfaces:
NamedWriteable, Writeable, Resolvable, Unresolvable

public class UnresolvedNamePattern extends UnresolvedNamedExpression
Unresolved expression for encapsulating a pattern: KEEP `a*`, b*, `c*`*`d*` a* is an actual name (UnresolvedAttribute) b* is a name pattern (this class) `c*`*`d*` is a name pattern
  • Constructor Details

    • UnresolvedNamePattern

      public UnresolvedNamePattern(Source source, org.apache.lucene.util.automaton.CharacterRunAutomaton automaton, String patternString, String name)
  • Method Details

    • writeTo

      public void writeTo(StreamOutput out) throws IOException
      Throws:
      IOException
    • getWriteableName

      public String getWriteableName()
    • match

      public boolean match(String string)
    • name

      public String name()
      Overrides:
      name in class UnresolvedNamedExpression
    • pattern

      public String pattern()
    • replaceChildren

      public Expression replaceChildren(List<Expression> newChildren)
      Specified by:
      replaceChildren in class Node<Expression>
    • info

      protected NodeInfo<UnresolvedNamePattern> 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<Expression>
    • 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.
    • errorMessage

      public static String errorMessage(String pattern, List<String> potentialMatches)
    • nullable

      public Nullability nullable()
      Specified by:
      nullable in class Expression
    • innerHashCode

      protected int innerHashCode(boolean ignoreIds)
      Overrides:
      innerHashCode in class NamedExpression
    • innerEquals

      protected boolean innerEquals(Object o, boolean ignoreIds)
      Description copied from class: NamedExpression
      The actual equality check, after shortcutting this == o and class checks.
      Overrides:
      innerEquals in class NamedExpression
    • rewriteWildcardPattern

      public static void rewriteWildcardPattern(StringBuilder sb, String pattern, NodeStringMapper mapper)
      Renders a wildcard-style pattern (SQL LIKE / shell KEEP *foo*) preserving the metacharacters *, ?, %, _ verbatim; each literal run between metacharacters routes through mapper.column. Backslash escapes the next character (treated as literal).
    • toString

      public String toString()
      Overrides:
      toString in class NamedExpression