-
Notifications
You must be signed in to change notification settings - Fork 25.7k
ESQL: Fix AsyncOperator status values and add emitted rows #132738
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
Merged
ivancea
merged 25 commits into
elastic:main
from
ivancea:esql-lookup-warnings-status-race
Aug 21, 2025
Merged
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
283c2d5
Fixed status variables naming
ivancea 010d915
Fixed notifying threads before updating stats and warnings
ivancea 262f488
Fixed status values for AsyncOperator
ivancea 35d2ca2
Added emittedRows and transport version
ivancea 916f591
Added capability for the fix
ivancea 5d74c2d
Unmuted tests
ivancea 007fd4a
Undo extracted PR changes
ivancea 0da2e4e
Merge branch 'main' into esql-lookup-warnings-status-race
ivancea 55f8804
Remove unused supress warnings
ivancea 5535503
Remove TODO
ivancea ba84ddd
Merge branch 'main' into esql-lookup-warnings-status-race
ivancea 4afdc80
Update docs/changelog/132738.yaml
ivancea 121ce8a
Rename received_pages to pages_received, and similar status fields
ivancea a775efb
Merge branch 'main' into esql-lookup-warnings-status-race
ivancea 5dbbd22
Update test after merge
ivancea 1b5ae7d
Merge branch 'main' into esql-lookup-warnings-status-race
ivancea bf4aea8
Improve Lookup operator test for status
ivancea e2de5ed
[CI] Auto commit changes from spotless
6a505b0
Fix assertion type for map numbers
ivancea 25ef602
Fix Lucene tests operator status check
ivancea e8e9226
Update Limit operator tests
ivancea 9c64a0b
Merge branch 'main' into esql-lookup-warnings-status-race
ivancea 523d542
Merge branch 'main' into esql-lookup-warnings-status-race
ivancea b56abca
Remove custom matching functions
ivancea 675d171
Merge branch 'main' into esql-lookup-warnings-status-race
ivancea File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| pr: 132738 | ||
| summary: Fix `AsyncOperator` status values and add emitted rows | ||
| area: ES|QL | ||
| type: bug | ||
| issues: [] |
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
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
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
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
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
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
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
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
38 changes: 38 additions & 0 deletions
38
...esql/compute/test/src/main/java/org/elasticsearch/compute/test/AsyncOperatorTestCase.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| /* | ||
| * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
| * or more contributor license agreements. Licensed under the Elastic License | ||
| * 2.0; you may not use this file except in compliance with the Elastic License | ||
| * 2.0. | ||
| */ | ||
|
|
||
| package org.elasticsearch.compute.test; | ||
|
|
||
| import org.elasticsearch.compute.data.Page; | ||
| import org.elasticsearch.test.MapMatcher; | ||
| import org.hamcrest.Matcher; | ||
|
|
||
| import java.util.List; | ||
| import java.util.Map; | ||
|
|
||
| import static org.elasticsearch.test.MapMatcher.assertMap; | ||
| import static org.elasticsearch.test.MapMatcher.matchesMap; | ||
| import static org.hamcrest.Matchers.either; | ||
| import static org.hamcrest.Matchers.greaterThanOrEqualTo; | ||
|
|
||
| public abstract class AsyncOperatorTestCase extends OperatorTestCase { | ||
| @Override | ||
| @SuppressWarnings("unchecked") | ||
| protected final void assertStatus(Map<String, Object> map, List<Page> input, List<Page> output) { | ||
| var mapMatcher = matchesMap().entry("pages_received", input.size()) | ||
| .entry("pages_completed", input.size()) | ||
| .entry("process_nanos", either(greaterThanOrEqualTo(0)).or((Matcher<Integer>) (Matcher<?>) greaterThanOrEqualTo(0L))); | ||
|
|
||
| mapMatcher = extendStatusMatcher(mapMatcher, input, output); | ||
|
|
||
| assertMap(map, mapMatcher); | ||
| } | ||
|
|
||
| protected MapMatcher extendStatusMatcher(MapMatcher mapMatcher, List<Page> input, List<Page> output) { | ||
| return mapMatcher; | ||
| } | ||
| } |
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
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
Oops, something went wrong.
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.
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.
👍 These are correct usages.