Class EsqlSession
java.lang.Object
org.elasticsearch.xpack.esql.session.EsqlSession
Combines all components necessary for the coordinating node to plan and execute an ESQL query,
including (pre-)analyzing, optimizing and running the physical plan.
In particular, this is where we perform remote calls to pre-analyze the query, that is, to resolve indices, enrich policies and their mappings.
Note that this is not a session in the traditional sense of a stateful connection. This will produce a single result set that is either returned to the user directly or stored for later retrieval if the query was async.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceInterface for running the underlying plan.static final record -
Constructor Summary
ConstructorsConstructorDescriptionEsqlSession(String sessionId, TransportVersion localClusterMinimumVersion, AnalyzerSettings analyzerSettings, IndexResolver indexResolver, EnrichPolicyResolver enrichPolicyResolver, ViewResolver viewResolver, ExternalSourceResolver externalSourceResolver, EsqlParser parser, PreAnalyzer preAnalyzer, EsqlFunctionRegistry functionRegistry, Mapper mapper, Verifier verifier, Metrics metrics, PlanTelemetry planTelemetry, IndicesExpressionGrouper indicesExpressionGrouper, ProjectMetadata projectMetadata, PlannerSettings plannerSettings, TransportActionServices services) -
Method Summary
Modifier and TypeMethodDescriptionstatic ApproximationSettingsapproximationSettings(EsqlQueryRequest request, EsqlStatement statement) voidexecute(EsqlQueryRequest request, EsqlExecutionInfo executionInfo, EsqlSession.PlanRunner planRunner, ActionListener<Versioned<Result>> listener) Execute an ESQL request.
-
Constructor Details
-
EsqlSession
public EsqlSession(String sessionId, TransportVersion localClusterMinimumVersion, AnalyzerSettings analyzerSettings, IndexResolver indexResolver, EnrichPolicyResolver enrichPolicyResolver, ViewResolver viewResolver, ExternalSourceResolver externalSourceResolver, EsqlParser parser, PreAnalyzer preAnalyzer, EsqlFunctionRegistry functionRegistry, Mapper mapper, Verifier verifier, Metrics metrics, PlanTelemetry planTelemetry, IndicesExpressionGrouper indicesExpressionGrouper, ProjectMetadata projectMetadata, PlannerSettings plannerSettings, TransportActionServices services)
-
-
Method Details
-
sessionId
-
execute
public void execute(EsqlQueryRequest request, EsqlExecutionInfo executionInfo, EsqlSession.PlanRunner planRunner, ActionListener<Versioned<Result>> listener) Execute an ESQL request. -
approximationSettings
public static ApproximationSettings approximationSettings(EsqlQueryRequest request, EsqlStatement statement)
-