Class PreparedEsqlQueryRequest
java.lang.Object
org.elasticsearch.transport.TransportMessage
org.elasticsearch.transport.AbstractTransportRequest
org.elasticsearch.action.ActionRequest
org.elasticsearch.action.LegacyActionRequest
org.elasticsearch.xpack.core.esql.action.EsqlQueryRequest
org.elasticsearch.xpack.esql.action.EsqlQueryRequest
org.elasticsearch.xpack.esql.action.PreparedEsqlQueryRequest
- All Implemented Interfaces:
CompositeIndicesRequest,Writeable,org.elasticsearch.core.RefCounted,TaskAwareRequest,TransportRequest
An
EsqlQueryRequest backed by a pre-built EsqlStatement, bypassing ES|QL string
parsing. Used by internal callers (such as the Prometheus REST endpoints) that construct an
EsqlStatement directly instead of going through ES|QL string construction and parsing.
The query string carried by this request is only used for logging and display; it plays no role in execution.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsFields inherited from class org.elasticsearch.xpack.esql.action.EsqlQueryRequest
DEFAULT_KEEP_ALIVE, DEFAULT_WAIT_FOR_COMPLETIONFields inherited from interface org.elasticsearch.core.RefCounted
ALWAYS_REFERENCED -
Method Summary
Modifier and TypeMethodDescriptionstatic PreparedEsqlQueryRequestasync(EsqlStatement statement, String queryDescription) Creates an asynchronous request backed by the given pre-built statement.static PreparedEsqlQueryRequestfrom(EsqlQueryRequest source, EsqlStatement statement, String queryDescription) Creates a request backed bystatementwith all other properties copied fromsource.parse(EsqlParser parser, SettingsValidationContext settingsValidationCtx, InferenceSettings inferenceSettings) Returns the pre-built statement directly, without invoking the parser, after validating its settings.query()Returns a non-null human-readable description of the query for logging, task descriptions, and error messages.Returns the pre-built statement carried by this request.static PreparedEsqlQueryRequestsync(EsqlStatement statement, String queryDescription) Creates a synchronous request backed by the given pre-built statement.protected ActionRequestValidationExceptionvoidwriteTo(StreamOutput out) Methods inherited from class org.elasticsearch.xpack.esql.action.EsqlQueryRequest
addTable, allowPartialResults, allowPartialResults, approximation, approximation, async, asyncEsqlQueryRequest, columnar, columnar, createTask, filter, filter, includeCCSMetadata, includeCCSMetadata, includeExecutionMetadata, includeExecutionMetadata, keepAlive, keepAlive, keepOnCompletion, keepOnCompletion, locale, locale, params, params, pragmas, pragmas, profile, profile, projectRouting, projectRouting, syncEsqlQueryRequest, tables, timeZone, timeZone, validate, waitForCompletionTimeout, waitForCompletionTimeoutMethods inherited from class org.elasticsearch.action.ActionRequest
getShouldStoreResultMethods inherited from class org.elasticsearch.transport.AbstractTransportRequest
getParentTask, getRequestId, remoteAddress, remoteAddress, setParentTask, setRequestId, toStringMethods inherited from class org.elasticsearch.transport.TransportMessage
decRef, hasReferences, incRef, tryIncRefMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.core.RefCounted
decRef, hasReferences, incRef, mustIncRef, tryIncRefMethods inherited from interface org.elasticsearch.tasks.TaskAwareRequest
createTask, getDescription, setParentTask
-
Field Details
-
PREPARED_QUERY_PREFIX
- See Also:
-
-
Method Details
-
sync
Creates a synchronous request backed by the given pre-built statement. -
async
Creates an asynchronous request backed by the given pre-built statement. -
from
public static PreparedEsqlQueryRequest from(EsqlQueryRequest source, EsqlStatement statement, String queryDescription) Creates a request backed bystatementwith all other properties copied fromsource. -
statement
Returns the pre-built statement carried by this request. -
query
- Overrides:
queryin classEsqlQueryRequest
-
query
- Overrides:
queryin classEsqlQueryRequest
-
queryDescription
Description copied from class:EsqlQueryRequestReturns a non-null human-readable description of the query for logging, task descriptions, and error messages. For regular requests this is the same asEsqlQueryRequest.query(). Overridden byPreparedEsqlQueryRequestto return a display string when there is no query text.- Overrides:
queryDescriptionin classEsqlQueryRequest
-
validateQuery
- Overrides:
validateQueryin classEsqlQueryRequest
-
parse
public EsqlStatement parse(EsqlParser parser, SettingsValidationContext settingsValidationCtx, InferenceSettings inferenceSettings) Returns the pre-built statement directly, without invoking the parser, after validating its settings.- Overrides:
parsein classEsqlQueryRequest
-
writeTo
- Specified by:
writeToin interfaceWriteable- Overrides:
writeToin classActionRequest- Throws:
IOException
-