Class Configuration

java.lang.Object
org.elasticsearch.xpack.esql.session.Configuration
All Implemented Interfaces:
Writeable

public class Configuration extends Object implements Writeable
  • Field Details

    • QUERY_COMPRESS_THRESHOLD_CHARS

      public static final int QUERY_COMPRESS_THRESHOLD_CHARS
    • ESQL_VIEW_QUERIES

      public static final TransportVersion ESQL_VIEW_QUERIES
      Transport version for view queries support. This is needed to correctly serialize/deserialize Source objects that originated from views (which have positions relative to the view query, not the main query).
  • Constructor Details

  • Method Details

    • writeTo

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

      public ZoneId zoneId()
    • now

      public Instant now()
    • clusterName

      public String clusterName()
    • username

      public String username()
    • pragmas

      public QueryPragmas pragmas()
    • resultTruncationMaxSize

      public int resultTruncationMaxSize(boolean isTimeseries)
    • resultTruncationDefaultSize

      public int resultTruncationDefaultSize(boolean isTimeseries)
    • locale

      public Locale locale()
    • query

      public String query()
    • absoluteStartedTimeInMillis

      public long absoluteStartedTimeInMillis()
      Returns the current time in milliseconds from the time epoch for the execution of this request. It ensures consistency by using the same value on all nodes involved in the search request.
    • queryStartTimeNanos

      public long queryStartTimeNanos()
      Returns:
      Start time of the ESQL query in nanos
    • newFoldContext

      public FoldContext newFoldContext()
      Create a new FoldContext with the limit configured in the QueryPragmas.
    • tables

      public Map<String,Map<String,Column>> tables()
      Tables specified in the request.
    • withoutTables

      public Configuration withoutTables()
    • profile

      public boolean profile()
      Enable profiling, sacrificing performance to return information about what operations are taking the most time.
    • allowPartialResults

      public boolean allowPartialResults()
      Whether this request can return partial results instead of failing fast on failures
    • explainOnly

      public boolean explainOnly()
      Whether this is an explain-only request. This flag is propagated to data nodes and could be used for future optimization to skip actual computation. Currently, the EXPLAIN command executes the query normally with profile=true.
    • withExplainOnly

      public Configuration withExplainOnly()
      Returns a new Configuration with profile and explainOnly enabled. Used for EXPLAIN queries that need to capture plan information.
    • projectRouting

      public String projectRouting()
    • approximationSettings

      public ApproximationSettings approximationSettings()
    • viewQueries

      public Map<String,String> viewQueries()
      Returns the map of view names to their query strings.
    • withViewQueries

      public Configuration withViewQueries(Map<String,String> viewQueries)
      Returns a new Configuration with the given view queries added.
    • 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
    • readWithoutTables

      public static Configuration readWithoutTables(StreamInput in) throws IOException
      Reads a Configuration that doesn't contain any tables().
      Throws:
      IOException