Class PlanStreamOutput

java.lang.Object
java.io.OutputStream
org.elasticsearch.common.io.stream.StreamOutput
org.elasticsearch.xpack.esql.io.stream.PlanStreamOutput
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable

public final class PlanStreamOutput extends StreamOutput
A customized stream output used to serialize ESQL physical plan fragments. Complements stream output with methods that write plan nodes, Attributes, Expressions, etc.
  • Field Details

    • MAX_SERIALIZED_ATTRIBUTES

      protected static final int MAX_SERIALIZED_ATTRIBUTES
      max number of attributes that can be cached for serialization

      TODO should this be a cluster setting...?

      See Also:
    • cachedAttributes

      protected final Map<Attribute,Integer> cachedAttributes
      Cache for field attributes. Field attributes can be a significant part of the query execution plan, especially for queries like `from *`, that can have thousands of output columns. Attributes can be shared by many plan nodes (eg. ExcahngeSink output, Project output, EsRelation fields); in addition, multiple Attributes can share the same parent field. This cache allows to send each attribute only once; from the second occurrence, only an id will be sent
    • cachedEsFields

      protected final Map<EsField,Integer> cachedEsFields
      Cache for EsFields.
    • stringCache

      protected final Map<String,Integer> stringCache
  • Constructor Details

  • Method Details