Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -550,9 +550,9 @@ private void resolveIndicesAndAnalyze(
executionInfo
);

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

/**
* Perform a field caps request for each lookup index. Does not update the minimum transport version.
*/
private void preAnalyzeLookupIndices(
Iterator<IndexPattern> lookupIndices,
PreAnalysisResult preAnalysisResult,
Expand Down Expand Up @@ -795,6 +798,10 @@ private void validateRemoteVersions(EsqlExecutionInfo executionInfo) {
});
}

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