-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[Derived Fields] Add aggregation support for derived fields #14618
Conversation
❌ Gradle check result for 5c150d5: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
server/src/main/java/org/opensearch/index/mapper/DerivedFieldType.java
Outdated
Show resolved
Hide resolved
❌ Gradle check result for 92c4724: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
❌ Gradle check result for 6336b13: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
❌ Gradle check result for 78cd442: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
❌ Gradle check result for f71f55d: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
I see that it is documented in the limitation section but we should have the logic to handle this in the service side as @jed326 pointed out. Also we should add tests with concurrent search enabled as well for any new search feature to ensure that it works well with that as well. |
@jed326 could you help me understand why/how the LeafSearchLookup is shared across multiple threads in concurrent segment search codepath? |
@rishabhmaurya shared some more details in #12331 (comment) |
❌ Gradle check result for f71f55d: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Would prefer we tackle the issue with concurrent search separately from this. Will make a separate issue and see what we can do. @jed326 @rishabhmaurya wdyt?
@sohami I think it would be nice to randomize here with yaml tests vs requiring a separate parameterized case every time. |
Signed-off-by: Marc Handalian <[email protected]>
@mch2 The biggest concern I have right now is that we document that derived fields does not support concurrent segment search but there's no service side enforcement of that. I'm fine with taking that as a fast follow-up but want to make sure we don't lose track of that task. It should be a simple addition to this method to do so but will leave that to you to decide how to handle it. |
At least for concurrent search part of the problem is that in the yaml tests it's hard to ensure there are multiple segments so that we actually go down the concurrent search path. In the Java ITs this method Lines 36 to 41 in f5b0eba
is used as a best effort to add (deleted) dummy docs and ensure we actually go down the concurrent search path. |
added a docs issue - opensearch-project/documentation-website#7850 |
Agreed - cut #15007
hmm true, maybe we can do the same here with yml tests re dummy docs. |
❌ Gradle check result for 7fcab64: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
|
* Add aggregation support for derived fields Signed-off-by: Marc Handalian <[email protected]> * add unit test for a terms agg with derived fields Signed-off-by: Marc Handalian <[email protected]> * Fix license header and add changelog entry Signed-off-by: Marc Handalian <[email protected]> * move matrix_stats tests to aggs-matrix-stats module Signed-off-by: Marc Handalian <[email protected]> * Move matrix tests back and add dependency to painless module Signed-off-by: Marc Handalian <[email protected]> * add tests for all aggregations types and support ip_range Signed-off-by: Marc Handalian <[email protected]> * Add tests for agg script returned from DerivedFieldType Signed-off-by: Marc Handalian <[email protected]> * remove children aggs test as its not yet supported Signed-off-by: Marc Handalian <[email protected]> * Add more tests Signed-off-by: Marc Handalian <[email protected]> * fix changelog Signed-off-by: Marc Handalian <[email protected]> --------- Signed-off-by: Marc Handalian <[email protected]> (cherry picked from commit e26608b) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…ields (#15009) * [Derived Fields] Add aggregation support for derived fields (#14618) * Add aggregation support for derived fields Signed-off-by: Marc Handalian <[email protected]> * add unit test for a terms agg with derived fields Signed-off-by: Marc Handalian <[email protected]> * Fix license header and add changelog entry Signed-off-by: Marc Handalian <[email protected]> * move matrix_stats tests to aggs-matrix-stats module Signed-off-by: Marc Handalian <[email protected]> * Move matrix tests back and add dependency to painless module Signed-off-by: Marc Handalian <[email protected]> * add tests for all aggregations types and support ip_range Signed-off-by: Marc Handalian <[email protected]> * Add tests for agg script returned from DerivedFieldType Signed-off-by: Marc Handalian <[email protected]> * remove children aggs test as its not yet supported Signed-off-by: Marc Handalian <[email protected]> * Add more tests Signed-off-by: Marc Handalian <[email protected]> * fix changelog Signed-off-by: Marc Handalian <[email protected]> --------- Signed-off-by: Marc Handalian <[email protected]> (cherry picked from commit e26608b) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * Fix derived field tests for percentile ranks. (#15015) These tests fail to backport to 2.x becuase 2.x uses a different branch of tdigest that computes percentiles differently. Rather than chase these over time, change the assertions to check for the length of results returned instead of their values. Signed-off-by: Marc Handalian <[email protected]> (cherry picked from commit 0cde7ba) Signed-off-by: Marc Handalian <[email protected]> --------- Signed-off-by: Marc Handalian <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Marc Handalian <[email protected]>
…ch-project#14618) * Add aggregation support for derived fields Signed-off-by: Marc Handalian <[email protected]> * add unit test for a terms agg with derived fields Signed-off-by: Marc Handalian <[email protected]> * Fix license header and add changelog entry Signed-off-by: Marc Handalian <[email protected]> * move matrix_stats tests to aggs-matrix-stats module Signed-off-by: Marc Handalian <[email protected]> * Move matrix tests back and add dependency to painless module Signed-off-by: Marc Handalian <[email protected]> * add tests for all aggregations types and support ip_range Signed-off-by: Marc Handalian <[email protected]> * Add tests for agg script returned from DerivedFieldType Signed-off-by: Marc Handalian <[email protected]> * remove children aggs test as its not yet supported Signed-off-by: Marc Handalian <[email protected]> * Add more tests Signed-off-by: Marc Handalian <[email protected]> * fix changelog Signed-off-by: Marc Handalian <[email protected]> --------- Signed-off-by: Marc Handalian <[email protected]>
…ch-project#14618) * Add aggregation support for derived fields Signed-off-by: Marc Handalian <[email protected]> * add unit test for a terms agg with derived fields Signed-off-by: Marc Handalian <[email protected]> * Fix license header and add changelog entry Signed-off-by: Marc Handalian <[email protected]> * move matrix_stats tests to aggs-matrix-stats module Signed-off-by: Marc Handalian <[email protected]> * Move matrix tests back and add dependency to painless module Signed-off-by: Marc Handalian <[email protected]> * add tests for all aggregations types and support ip_range Signed-off-by: Marc Handalian <[email protected]> * Add tests for agg script returned from DerivedFieldType Signed-off-by: Marc Handalian <[email protected]> * remove children aggs test as its not yet supported Signed-off-by: Marc Handalian <[email protected]> * Add more tests Signed-off-by: Marc Handalian <[email protected]> * fix changelog Signed-off-by: Marc Handalian <[email protected]> --------- Signed-off-by: Marc Handalian <[email protected]>
Description
Adds aggregation support for derived fields.
Related Issues
Resolves #14590
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.