Class QueryPragmas
java.lang.Object
org.elasticsearch.xpack.esql.plugin.QueryPragmas
- All Implemented Interfaces:
Writeable
Holds the pragmas for an ESQL query. Just a wrapper of settings for now.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsModifier and TypeFieldDescriptionThe number of branches to execute in parallel.How to cutslicesto cut each shard into.static final QueryPragmasControls how external source queries are distributed across nodes.static final Setting<MappedFieldType.FieldExtractPreference> static final Setting<ByteSizeValue> Whentrue, forces all non-single-segment pages throughValuesFromDocSequenceregardless of the number ofBYTES_REFfields.Query-level override for the maximum number of keyword sort fields allowed when pushing TopN to Lucene.Size of a page in entries with0being a special value asking to adaptively size based on the number of columns in the page.Number of parallel parser threads for intra-file text format parsing (CSV, NDJSON).The maximum number of rounding points to push down to Lucene for theroundTofunction at query level.static final Setting<org.elasticsearch.core.TimeValue> The minimum interval between syncs of theDriverStatus, making the status available to task API. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintintdataPartitioning(DataPartitioning defaultDataPartitioning) intdocSequenceBytesRefFieldThreshold(int clusterDefault) Returns the effective doc-sequence threshold.intdocsThresholdForAutoPartitioning(int defaultThreshold) intReturns the maximum number of workers for enrich lookup.booleanintThe default preference for extracting fields, defaults toNONE.The maximum amount of memory we can use forExpression.fold(org.elasticsearch.xpack.esql.core.expression.FoldContext)during planing.booleanReturns true if we should add the implicit LIMIT to FORK branchesinthashCode()booleanisEmpty()intThe maximum number of nodes to be queried at once by this query.intThe maximum number of shards can be executed concurrently on a single node by this query.intbooleanReturns true if each data node should perform a local reduction for sort, limit, topN, stats or false if the coordinator node will perform the reduction.intpageSize()Size of a page in entries with0being a special value asking to adaptively size based on the number of columns in the page.intintpartialAggregationEmitKeysThreshold(int defaultThreshold) doublepartialAggregationEmitUniquenessThreshold(double defaultThreshold) intsettings()Returns the underlying settings.org.elasticsearch.core.TimeValueThe minimum interval between syncs of theDriverStatus, making the status available to task API.inttoString()intAmount of attempts moved shards could be retried.voidwriteTo(StreamOutput out)
-
Field Details
-
EXCHANGE_BUFFER_SIZE
-
ENRICH_MAX_WORKERS
-
TASK_CONCURRENCY
-
DATA_PARTITIONING
How to cutslicesto cut each shard into. Is parsed to the enumDataPartitioningwhich has more documentation. Not anSetting.enumSetting(java.lang.Class<T>, java.lang.String, T, org.elasticsearch.common.settings.Setting.Property...)because those can't havenulldefaults.nullhere means "use the default from the cluster setting namedPlannerSettings.DEFAULT_DATA_PARTITIONING." -
PAGE_SIZE
Size of a page in entries with0being a special value asking to adaptively size based on the number of columns in the page. -
STATUS_INTERVAL
The minimum interval between syncs of theDriverStatus, making the status available to task API. -
MAX_CONCURRENT_NODES_PER_CLUSTER
-
MAX_CONCURRENT_SHARDS_PER_NODE
-
UNAVAILABLE_SHARD_RESOLUTION_ATTEMPTS
-
NODE_LEVEL_REDUCTION
-
FOLD_LIMIT
-
FIELD_EXTRACT_PREFERENCE
-
ROUNDTO_PUSHDOWN_THRESHOLD
The maximum number of rounding points to push down to Lucene for theroundTofunction at query level.ReplaceRoundToWithQueryAndTagschecks this threshold before rewritingRoundToto range queries. There is also a cluster level ESQL_ROUNDTO_PUSHDOWN_THRESHOLD defined inEsqlFlags. The query level threshold defaults to -1, which means this query level setting is not set and cluster level upper limit will be used. The cluster level threshold defaults to 127, it is the same as the maximum number of buckets used inRounding. If query level threshold is set to greater than or equals to 0, the query level threshold will be used, and it overrides the cluster level threshold. If the query level threshold is set to 0, noRoundTopushdown will be performed. -
MAX_KEYWORD_SORT_FIELDS
Query-level override for the maximum number of keyword sort fields allowed when pushing TopN to Lucene. Defaults to-1, meaning the cluster-level settingPlannerSettings.MAX_KEYWORD_SORT_FIELDSis used. When set to a value>= 0, it overrides the cluster-level threshold for this query only. The resolution logic lives inPushTopNToSource. -
EXTERNAL_DISTRIBUTION
Controls how external source queries are distributed across nodes. Valid values: "adaptive" (default), "coordinator_only", "round_robin". -
FORK_IMPLICIT_LIMIT
-
BRANCH_PARALLEL_DEGREE
The number of branches to execute in parallel. This is a safeguard to avoid overloading the cluster with too many parallel branches. This applies to forks and subqueries. -
PARSING_PARALLELISM
Number of parallel parser threads for intra-file text format parsing (CSV, NDJSON). Defaults to allocated processors. Set to 1 to disable parallel parsing. -
FORCE_DOC_SEQUENCE
Whentrue, forces all non-single-segment pages throughValuesFromDocSequenceregardless of the number ofBYTES_REFfields. Intended for testing the correctness of doc-sequence loading. -
EMPTY
-
-
Constructor Details
-
QueryPragmas
-
QueryPragmas
- Throws:
IOException
-
-
Method Details
-
settings
Returns the underlying settings. -
writeTo
- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
getSettings
-
exchangeBufferSize
public int exchangeBufferSize() -
concurrentExchangeClients
public int concurrentExchangeClients() -
dataPartitioning
-
taskConcurrency
public int taskConcurrency() -
pageSize
public int pageSize()Size of a page in entries with0being a special value asking to adaptively size based on the number of columns in the page. -
statusInterval
public org.elasticsearch.core.TimeValue statusInterval()The minimum interval between syncs of theDriverStatus, making the status available to task API. -
enrichMaxWorkers
public int enrichMaxWorkers()Returns the maximum number of workers for enrich lookup. A higher number of workers reduces latency but increases cluster load. Defaults to 1. -
maxConcurrentNodesPerCluster
public int maxConcurrentNodesPerCluster()The maximum number of nodes to be queried at once by this query. This is safeguard to avoid overloading the cluster. -
maxConcurrentShardsPerNode
public int maxConcurrentShardsPerNode()The maximum number of shards can be executed concurrently on a single node by this query. This is a safeguard to avoid opening and holding many shards (equivalent to many file descriptors) or having too many field infos created by a single query. -
nodeLevelReduction
public boolean nodeLevelReduction()Returns true if each data node should perform a local reduction for sort, limit, topN, stats or false if the coordinator node will perform the reduction. -
foldLimit
The maximum amount of memory we can use forExpression.fold(org.elasticsearch.xpack.esql.core.expression.FoldContext)during planing. This defaults to 5% of memory available on the current node. If this method is called on the coordinating node, this is 5% of the coordinating node's memory. If it's called on a data node, it's 5% of the data node. That's an exciting inconsistency. But it's important. Bigger nodes have more space to do folding. -
fieldExtractPreference
The default preference for extracting fields, defaults toNONE. Some fields must be extracted in some special way because of how they are used in the plan. But most fields can be loaded in many ways so they pick the ways that they think are most efficient in theirMappedFieldType.blockLoader(org.elasticsearch.index.mapper.MappedFieldType.BlockLoaderContext)method. This can influence their choice. -
roundToPushDownThreshold
public int roundToPushDownThreshold() -
forkImplicitLimit
public boolean forkImplicitLimit()Returns true if we should add the implicit LIMIT to FORK branches -
maxKeywordSortFields
public int maxKeywordSortFields() -
externalDistribution
-
parsingParallelism
public int parsingParallelism() -
branchParallelDegree
public int branchParallelDegree() -
docSequenceBytesRefFieldThreshold
public int docSequenceBytesRefFieldThreshold(int clusterDefault) Returns the effective doc-sequence threshold. WhenFORCE_DOC_SEQUENCEistrue, returns0so that all non-single-segment pages useValuesFromDocSequence; otherwise returnsclusterDefault. -
partialAggregationEmitKeysThreshold
public int partialAggregationEmitKeysThreshold(int defaultThreshold) -
partialAggregationEmitUniquenessThreshold
public double partialAggregationEmitUniquenessThreshold(double defaultThreshold) -
docsThresholdForAutoPartitioning
public int docsThresholdForAutoPartitioning(int defaultThreshold) -
isEmpty
public boolean isEmpty() -
equals
-
hashCode
public int hashCode() -
toString
-