Enum Class StripeColumnScope

java.lang.Object
java.lang.Enum<StripeColumnScope>
org.elasticsearch.xpack.esql.datasources.spi.StripeColumnScope
All Implemented Interfaces:
Serializable, Comparable<StripeColumnScope>, Constable

public enum StripeColumnScope extends Enum<StripeColumnScope>
How much per-stripe statistics a row-format external read should harvest while it scans, threaded to the readers through FormatReadContext.statsColumnScope(). Orthogonal to the stripe grid size (FormatReadContext.statsStripeSize()): the grid decides which stripe a record lands in, this scope decides what is summarised per stripe.

Row count is harvested in every mode except NONE. The min/max/null per-column summaries are gated separately so that a COUNT(*) read (which projects zero columns) still records a stripe's row count — the regression this enum was introduced to fix, where a zero-projection read harvested nothing and a warm COUNT(*) re-scanned the whole file.

The four modes are strictly nested — each contains everything the previous does and adds one band: NONECOUNT (adds the row count) ⊂ PROJECTED (adds min/max/null for the query's projected columns) ⊂ ALL (adds min/max/null for every remaining file column). So ALL's committed per-stripe column set is always a superset of what PROJECTED would commit for the same scan. ALL pays to type-convert and compare every file column per row; it is the opt-in broad mode whose payoff is serving a warm MIN/MAX of a column the cold query never projected.

The constants are uppercase to satisfy Setting.enumSetting; toString() renders the lowercase token (none/count/projected/all) used as the setting value.

  • Enum Constant Details

    • NONE

      public static final StripeColumnScope NONE
      Harvest no per-stripe statistics. A warm aggregate over this read always re-scans.
    • COUNT

      public static final StripeColumnScope COUNT
      Harvest per-stripe row count only — no per-column min/max/null. Enough to serve a warm COUNT(*).
    • PROJECTED

      public static final StripeColumnScope PROJECTED
      Harvest per-stripe row count plus min/max/null for the query's projected columns (the default).
    • ALL

      public static final StripeColumnScope ALL
      Harvest per-stripe row count plus min/max/null for every column in the file's schema.
  • Method Details

    • values

      public static StripeColumnScope[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static StripeColumnScope valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • harvestsColumns

      public boolean harvestsColumns()
      Whether per-column min/max/null statistics are harvested in this mode (true for PROJECTED and ALL).
    • toString

      public String toString()
      Overrides:
      toString in class Enum<StripeColumnScope>