Class EmptyAttribute

All Implemented Interfaces:
NamedWriteable, Writeable, Resolvable

public class EmptyAttribute extends Attribute
Marker for optional attributes. Acting as a dummy placeholder to avoid using null in the tree (which is not allowed).
  • Constructor Details

    • EmptyAttribute

      public EmptyAttribute(Source source)
  • Method Details

    • writeTo

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

      public String getWriteableName()
    • clone

      protected Attribute clone(Source source, String name, DataType type, Nullability nullability, NameId id, boolean synthetic)
      Specified by:
      clone in class Attribute
    • label

      protected String label()
      Specified by:
      label in class Attribute
    • resolved

      public boolean resolved()
      Specified by:
      resolved in interface Resolvable
      Overrides:
      resolved in class Expression
    • dataType

      public DataType dataType()
      Description copied from class: Expression
      The DataType returned by executing the tree rooted at this expression. If Expression.typeResolved() returns an error then the behavior of this method is undefined. It may return a valid type. Or it may throw an exception. Or it may return a totally nonsensical type.
      Specified by:
      dataType in class Expression
    • info

      protected NodeInfo<? extends Expression> 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>
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Attribute
    • innerEquals

      protected boolean innerEquals(Object o)
      Overrides:
      innerEquals in class Attribute