-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Refactor enrich policy resolution #133928
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Pinging @elastic/es-analytical-engine (Team:Analytics) |
|
|
||
| PreAnalyzer.PreAnalysis preAnalysis = preAnalyzer.preAnalyze(parsed); | ||
| var unresolvedPolicies = preAnalysis.enriches.stream().map(EnrichPolicyResolver.UnresolvedPolicy::from).collect(toSet()); | ||
|
|
There was a problem hiding this comment.
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()), |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This change implements trivial refactorings before moving enrich resolutions to its own field caps call.