Class ResolvedSettings

java.lang.Object
org.elasticsearch.xpack.esql.plan.ResolvedSettings
All Implemented Interfaces:
Writeable

public final class ResolvedSettings extends Object implements Writeable
Immutable typed view of resolved query setting values, produced by QuerySettings.resolve(java.util.Map<org.elasticsearch.xpack.esql.plan.QuerySettingDef<?>, java.lang.Object>, org.elasticsearch.xpack.esql.plan.EsqlStatement, org.elasticsearch.xpack.esql.plan.SettingsValidationContext). Read via QuerySettingDef.get(ResolvedSettings) on each setting's constant.

Travels with Configuration across the wire to data nodes; every node and driver that holds a Configuration also holds the full resolved view.

  • Field Details

  • Constructor Details

  • Method Details

    • writeTo

      public void writeTo(StreamOutput out) throws IOException
      Writes every resolved setting as a (name, length-prefixed value) pair. Length-prefixing each value makes the block self-describing: a reader can skip a setting it doesn't recognize (see the constructor), so this format is forward-compatible.

      Adding a setting needs no new transport version. The block as a whole is introduced once, gated in Configuration on esql_resolved_settings; thereafter a new setting is just a new entry, and older peers ignore names they don't know. (An old peer therefore falls back to the setting's default for one it hasn't learned yet — fine for coordinator-resolved settings; a future setting that must hard-fail on an old data node should additionally version-gate its inclusion here.)

      Specified by:
      writeTo in interface Writeable
      Throws:
      IOException
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • withOverride

      public <T> ResolvedSettings withOverride(QuerySettingDef<T> def, @Nullable T value)
      Produce a copy with one setting's value overridden (or removed, if value is null). Used by Configuration.withSetting / ConfigurationBuilder.setting and similar copy-with-modification helpers.