Class EsQueryExec

All Implemented Interfaces:
NamedWriteable, Writeable, EstimatesRowSize

public class EsQueryExec extends LeafExec implements EstimatesRowSize
  • Field Details

    • DOC_ID_FIELD

      public static final EsField DOC_ID_FIELD
    • TIME_SERIES_SOURCE_FIELDS

      public static final List<EsField> TIME_SERIES_SOURCE_FIELDS
  • Constructor Details

  • Method Details

    • writeTo

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

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

      public static boolean isDocAttribute(Attribute attr)
    • hasScoring

      public boolean hasScoring()
    • info

      protected NodeInfo<EsQueryExec> 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<PhysicalPlan>
    • indexPattern

      public String indexPattern()
    • indexMode

      public IndexMode indexMode()
    • query

      public QueryBuilder query()
      query is merged into queryBuilderAndTags, keep this method as it is called by many many places in both tests and product code. If this method is called, the caller looks for the original queryBuilder, before ReplaceRoundToWithQueryAndTags converts it to multiple queries with tags.
    • output

      public List<Attribute> output()
      Description copied from class: QueryPlan
      The ordered list of attributes (i.e. columns) this plan produces when executed. Must be called only on resolved plans, otherwise may throw an exception or return wrong results.
      Specified by:
      output in class QueryPlan<PhysicalPlan>
    • limit

      public Expression limit()
    • sorts

      public List<EsQueryExec.Sort> sorts()
    • attrs

      public List<Attribute> attrs()
    • estimatedRowSize

      public Integer estimatedRowSize()
      Estimate of the number of bytes that'll be loaded per position before the stream of pages is consumed.
    • estimateRowSize

      public PhysicalPlan estimateRowSize(EstimatesRowSize.State state)
      Description copied from interface: EstimatesRowSize
      Estimate the number of bytes that'll be loaded per position before the stream of pages is consumed.
      Specified by:
      estimateRowSize in interface EstimatesRowSize
      Returns:
    • withLimit

      public EsQueryExec withLimit(Expression limit)
    • canPushSorts

      public boolean canPushSorts()
    • withSorts

      public EsQueryExec withSorts(List<EsQueryExec.Sort> sorts)
    • withQuery

      public EsQueryExec withQuery(QueryBuilder query)
      query is merged into queryBuilderAndTags, keep this method as it is called by too many places. If this method is called, the caller looks for the original queryBuilder, before ReplaceRoundToWithQueryAndTags converts it to multiple queries with tags.
    • queryBuilderAndTags

      public List<EsQueryExec.QueryBuilderAndTags> queryBuilderAndTags()
    • canSubstituteRoundToWithQueryBuilderAndTags

      public boolean canSubstituteRoundToWithQueryBuilderAndTags()
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in class PhysicalPlan
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in class PhysicalPlan
    • nodeString

      public String nodeString()
      Overrides:
      nodeString in class Node<PhysicalPlan>