Conversation
Signed-off-by: revijay <reshmi.vijayan@ibm.com>
revijay
requested review from
AMoo-Miki,
LDrago27,
Maosaic,
Qxisylolo,
SuZhou-Joe,
TackAdam,
ZilongX,
abbyhu2000,
ananzh,
angle943,
ashwin-pc,
bandinib-amzn,
d-buckner,
huyaboo,
joshuali925,
kavilla,
mengweieric,
paulstn,
ps48,
ruanyl,
ruchidh,
sejli,
sumukhswamy,
virajsanghvi,
wanglam,
xinruiba,
zengyan-amazon,
zhongnansu and
zhyuanqi
as code owners
September 6, 2026 13:27
Contributor
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fix the PPL search strategy aggregation loop to prevent request mutation and preserve aggregation results across multiple aggregation queries.
Previously, the aggregation request was reused and its nested query object was mutated for each aggregation. This could cause subsequent iterations to operate on a modified request. Additionally, aggs was reset inside the loop, causing results from previously processed aggregation keys to be overwritten.
This change:
Creates a fresh, isolated request for each aggregation query.
Preserves the original request query.
Initializes aggs once before the aggregation loop so results from all keys are retained.
Adds regression coverage for multiple aggregation queries.
Issues Resolved
Closes #11679
Screenshot
NA
Testing the changes
Targeted PPL search strategy tests:
yarn test:jest src/plugins/query_enhancements/server/search/ppl_search_strategy.test.ts
Result: 23 passed, 23 total
Also verified:
git diff --check
No whitespace errors.
The full Query Enhancements test suite was also run. It had one unrelated existing failure in:
src/plugins/query_enhancements/public/search/filters/sql_filter_utils.test.ts
The failing SQL test was reproduced independently and is unrelated to these changes.
Check List
yarn test:jestyarn test:jest_integration