Skip to content

Conversation

@idegtiarenko
Copy link
Contributor

This change implements trivial refactorings before moving enrich resolutions to its own field caps call.

@idegtiarenko idegtiarenko added >non-issue Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) :Analytics/ES|QL AKA ESQL v9.2.0 labels Sep 1, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-analytical-engine (Team:Analytics)


PreAnalyzer.PreAnalysis preAnalysis = preAnalyzer.preAnalyze(parsed);
var unresolvedPolicies = preAnalysis.enriches.stream().map(EnrichPolicyResolver.UnresolvedPolicy::from).collect(toSet());

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to eagerly transform Enrich -> UnresolvedPolicy here.
This is going to be transformed later in enrichPolicyResolver but only if there are actual policies to resolve.

}

doResolvePolicies(
new HashSet<>(executionInfo.getClusters().keySet()),
Copy link
Contributor Author

@idegtiarenko idegtiarenko Sep 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This separates enrich resolution from resolving list of remotes.
Today this is simply taken from the parsed list of expressions.
In future this is going to be replaced with async index resolution step, remotes taken from its result and supplied to doResolvePolicies via listener

Copy link
Contributor

@luigidellaquila luigidellaquila left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@idegtiarenko idegtiarenko merged commit cc66490 into elastic:main Sep 1, 2025
34 checks passed
@idegtiarenko idegtiarenko deleted the es-12612 branch September 1, 2025 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Analytics/ES|QL AKA ESQL >non-issue Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants