Skip to content

Conversation

@sandeshkr419
Copy link
Member

@sandeshkr419 sandeshkr419 commented Apr 9, 2025

Description

In existing aggregations supported by star-tree, this PR adds support for date range query to be used with supported aggregations. The query will be converted to a DimensionFilter and will be handled as part of star-tree traversal logic.

Related Issues

Resolves #17443

Check List

  • Functionality includes testing.
  • API changes companion pull request created, if applicable.
  • Public documentation issue/PR created, if applicable.

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.

@github-actions github-actions bot added enhancement Enhancement or improvement to existing feature or request Search:Aggregations labels Apr 9, 2025
@sandeshkr419 sandeshkr419 changed the title date range query changes [Star Tree] [Search] Support of Date Range Queries in Aggregations Apr 9, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Apr 9, 2025

❌ Gradle check result for e78f85a: 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?

@sandeshkr419 sandeshkr419 reopened this Apr 9, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Apr 9, 2025

✅ Gradle check result for e78f85a: SUCCESS

@codecov
Copy link

codecov bot commented Apr 9, 2025

Codecov Report

Attention: Patch coverage is 86.44068% with 24 lines in your changes missing coverage. Please review.

Project coverage is 72.67%. Comparing base (190ea02) to head (0c9ce37).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...tartree/filter/provider/DimensionFilterMapper.java 56.00% 5 Missing and 6 partials ⚠️
.../startree/filter/provider/StarDateFieldMapper.java 90.69% 2 Missing and 6 partials ⚠️
...nsearch/search/startree/filter/StarTreeFilter.java 78.57% 0 Missing and 3 partials ⚠️
...nsearch/search/startree/filter/MatchAllFilter.java 94.73% 0 Missing and 1 partial ⚠️
...search/search/startree/filter/MatchNoneFilter.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #17855      +/-   ##
============================================
- Coverage     72.73%   72.67%   -0.06%     
- Complexity    67933    67960      +27     
============================================
  Files          5525     5527       +2     
  Lines        312697   312824     +127     
  Branches      45379    45406      +27     
============================================
- Hits         227449   227360      -89     
- Misses        66723    66911     +188     
- Partials      18525    18553      +28     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions
Copy link
Contributor

github-actions bot commented Jun 9, 2025

❌ Gradle check result for 46e5cbb: 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?

@sandeshkr419
Copy link
Member Author

Thanks @expani for this suggestion, makes the code much cleaner and abstracted.

I also have a follow-up change #18477 planned to refactor StarTreeFilter next, that should help cleaning up some of the utility methods further by better supplying information about sub-dimension name.

So, some of the utility methods where I'm hacking my way to get the sub-dimension from the first DimensionFilter within a list of DimensionFilters should clean-up naturally. These planned changes were spilling over the scope of this PR given this PR already huge because of the added support with boolean queries on date ranges. I would have ideally included the entire boolean query side of changes in a separate PR, but that would have left the support for boolean queries in a broken state. Alternatively, pre-refactoring this leaves the code in an ugly state for sure.

cc: @bharath-techie @sachinpkale

@expani
Copy link
Contributor

expani commented Jun 9, 2025

Thanks @sandeshkr419 for the quick iteration on the comments.

Looks very close to what I was thinking and using the intended design. Follow up PR sounds good as this PR is already too big.

@github-actions
Copy link
Contributor

github-actions bot commented Jun 9, 2025

❌ Gradle check result for 80482d9: 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?

@github-actions
Copy link
Contributor

❌ Gradle check result for 90b092c: 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?

Copy link
Contributor

@expani expani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can take up the comments around design post this PR.

Signed-off-by: Sandesh Kumar <sandeshkr419@gmail.com>
Signed-off-by: Sandesh Kumar <sandeshkr419@gmail.com>
Signed-off-by: Sandesh Kumar <sandeshkr419@gmail.com>
Signed-off-by: Sandesh Kumar <sandeshkr419@gmail.com>
@github-actions
Copy link
Contributor

❕ Gradle check result for 0c9ce37: UNSTABLE

Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure.

@shwetathareja
Copy link
Member

Helping with the merge as PR is already approved by multiple folks

@shwetathareja shwetathareja merged commit 528e2b0 into opensearch-project:main Jun 10, 2025
30 checks passed
@sandeshkr419 sandeshkr419 deleted the d1 branch June 10, 2025 10:57
abhita pushed a commit to abhita/OpenSearch that referenced this pull request Jun 17, 2025
…pensearch-project#17855)

* support for date range boolean queries

Signed-off-by: Sandesh Kumar <sandeshkr419@gmail.com>
neuenfeldttj pushed a commit to neuenfeldttj/OpenSearch that referenced this pull request Jun 26, 2025
…pensearch-project#17855)

* support for date range boolean queries

Signed-off-by: Sandesh Kumar <sandeshkr419@gmail.com>Signed-off-by: TJ Neuenfeldt <tjneu@amazon.com>
neuenfeldttj pushed a commit to neuenfeldttj/OpenSearch that referenced this pull request Jun 26, 2025
…pensearch-project#17855)

* support for date range boolean queries

Signed-off-by: Sandesh Kumar <sandeshkr419@gmail.com>
tandonks pushed a commit to tandonks/OpenSearch that referenced this pull request Aug 5, 2025
…pensearch-project#17855)

* support for date range boolean queries

Signed-off-by: Sandesh Kumar <sandeshkr419@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Enhancement or improvement to existing feature or request Search:Aggregations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Star Tree] [Search] Support of Date Range Queries in Aggregations supported by Star-tree

5 participants