-
Notifications
You must be signed in to change notification settings - Fork 25.8k
Add a flag to control in index order execution mode to aggregations #82129
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
imotov
merged 11 commits into
elastic:master
from
imotov:issue-81121-add-in-order-aggs-executor
Jan 24, 2022
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
a2adf49
Add a flag to control in index order execution mode to aggregations
imotov 36398d1
Fix tests
imotov 86f9f9c
Fix TransformAggregationsTest
imotov 46623de
Merge remote-tracking branch 'elastic/master' into issue-81121-add-in…
imotov c3c0164
Switch TimeSeriesIndexSearcher to BucketCollector
imotov 16ee5f5
Fix NPE for empty context
imotov 9d10b4b
Merge remote-tracking branch 'elastic/master' into issue-81121-add-in…
imotov 082fd4d
Address review comments
imotov 5380d4b
Address more review comments
imotov 820305b
Merge branch 'master' into issue-81121-add-in-order-aggs-executor
elasticmachine ce057c5
Fix compilation errors
imotov 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
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
81 changes: 81 additions & 0 deletions
81
...spec/src/yamlRestTest/resources/rest-api-spec/test/search.aggregation/450_time_series.yml
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,81 @@ | ||
| setup: | ||
| - skip: | ||
| version: " - 8.1.0" | ||
| reason: Suipport for time_series aggs was added in 8.1.0 | ||
|
|
||
| - do: | ||
| indices.create: | ||
| index: tsdb | ||
| body: | ||
| settings: | ||
| number_of_replicas: 0 | ||
| mode: time_series | ||
| routing_path: [key] | ||
| time_series: | ||
| start_time: "2021-01-01T00:00:00Z" | ||
| end_time: "2022-01-01T00:00:00Z" | ||
| mappings: | ||
| properties: | ||
| key: | ||
| type: keyword | ||
| time_series_dimension: true | ||
| "@timestamp": | ||
| type: date | ||
|
|
||
| - do: | ||
| cluster.health: | ||
| wait_for_status: green | ||
|
|
||
| - do: | ||
| bulk: | ||
| index: tsdb | ||
| refresh: true | ||
| body: | ||
| - '{ "index": {} }' | ||
| - '{ "key": "bar", "val": 2, "@timestamp": "2021-01-01T00:00:10Z" }' | ||
| - '{ "index": {}}' | ||
| - '{ "key": "bar", "val": 10, "@timestamp": "2021-01-01T00:00:00Z" }' | ||
| - '{ "index": {}}' | ||
| - '{ "key": "bar", "val": 50, "@timestamp": "2021-01-01T00:00:30Z" }' | ||
| - '{ "index": {}}' | ||
| - '{ "key": "bar", "val": 40, "@timestamp": "2021-01-01T00:00:20Z" }' | ||
|
|
||
| # Let's try to create another segment to make things a bit more interesting | ||
| - do: | ||
| bulk: | ||
| index: tsdb | ||
| refresh: true | ||
| body: | ||
| - '{ "index": {} }' | ||
| - '{ "key": "foo", "val": 20, "@timestamp": "2021-01-01T00:00:00Z" }' | ||
| - '{ "create": {} }' | ||
| - '{ "key": "foo", "val": 30, "@timestamp": "2021-01-01T00:10:00Z" }' | ||
| - '{ "index": {} }' | ||
| - '{ "key": "baz", "val": 20, "@timestamp": "2021-01-01T00:00:00Z" }' | ||
| - '{ "index": {} }' | ||
| - '{ "key": "baz", "val": 20, "@timestamp": "2021-01-01T00:00:00" }' | ||
|
|
||
| --- | ||
| "Basic test": | ||
| - do: | ||
| search: | ||
| index: tsdb | ||
| body: | ||
| query: | ||
| range: | ||
| "@timestamp": | ||
| gte: "2021-01-01T00:10:00Z" | ||
| size: 0 | ||
| aggs: | ||
| ts: | ||
| time_series: | ||
| keyed: false | ||
|
|
||
|
|
||
|
|
||
| - match: { hits.total.value: 1 } | ||
| - length: { aggregations.ts.buckets: 1 } | ||
|
|
||
| - match: { aggregations.ts.buckets.0.key: { "key": "foo" } } | ||
| - match: { aggregations.ts.buckets.0.doc_count: 1 } | ||
|
|
||
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.
Uh oh!
There was an error while loading. Please reload this page.