Skip to content

Commit fb70dd8

Browse files
authored
ESQL: Add a bit of javadoc to preanalysis methods (#137099)
Explain where minimum transport version is determined for a given query.
1 parent 9605f38 commit fb70dd8

File tree

1 file changed

+10
-2
lines changed
  • x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/session

1 file changed

+10
-2
lines changed

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/session/EsqlSession.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -550,9 +550,10 @@ private void resolveIndicesAndAnalyze(
550550
executionInfo
551551
);
552552

553-
// The main index pattern dictates on which nodes the query can be executed, so we use the minimum transport version from this field
554-
// caps request.
555553
SubscribableListener.<PreAnalysisResult>newForked(
554+
// The main index pattern dictates on which nodes the query can be executed, so we use the minimum transport version from this
555+
// field
556+
// caps request.
556557
l -> preAnalyzeMainIndices(preAnalysis.indexes().entrySet().iterator(), preAnalysis, executionInfo, result, requestFilter, l)
557558
).andThenApply(r -> {
558559
if (r.indexResolution.isEmpty() == false // Rule out ROW case with no FROM clauses
@@ -576,6 +577,9 @@ private void resolveIndicesAndAnalyze(
576577
.addListener(logicalPlanListener);
577578
}
578579

580+
/**
581+
* Perform a field caps request for each lookup index. Does not update the minimum transport version.
582+
*/
579583
private void preAnalyzeLookupIndices(
580584
Iterator<IndexPattern> lookupIndices,
581585
PreAnalysisResult preAnalysisResult,
@@ -795,6 +799,10 @@ private void validateRemoteVersions(EsqlExecutionInfo executionInfo) {
795799
});
796800
}
797801

802+
/**
803+
* Perform a field caps request for each index pattern and determine the minimum transport version of all clusters with matching
804+
* indices.
805+
*/
798806
private void preAnalyzeMainIndices(
799807
Iterator<Map.Entry<IndexPattern, IndexMode>> indexPatterns,
800808
PreAnalyzer.PreAnalysis preAnalysis,

0 commit comments

Comments
 (0)