Skip to content

Conversation

@sawansri
Copy link
Contributor

@sawansri sawansri commented Jun 12, 2025

Description

Rewrites DateRangeIncludingNowQuery logic in handleNow to utilize optimizations made to Point Range Queries.

Related Issues

Resolves #18503

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 bug Something isn't working Search:Performance labels Jun 12, 2025
@github-actions
Copy link
Contributor

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

@sawansri sawansri changed the title Added approximation support for range queries with @now in date field Added approximation support for range queries with now in date field Jun 12, 2025
@github-actions
Copy link
Contributor

❌ Gradle check result for d3a0085: 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 93d2077: 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 4d47c42: 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 0b81313: 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?

@prudhvigodithi
Copy link
Member

Adding @kkewwei as well for the PR review.

@github-actions
Copy link
Contributor

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

@sawansri
Copy link
Contributor Author

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

Flaky test: #18310

@github-actions
Copy link
Contributor

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

@sawansri
Copy link
Contributor Author

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

Flaky test: #15840

@github-actions
Copy link
Contributor

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

@sawansri
Copy link
Contributor Author

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

Flaky test: #14509

@github-actions
Copy link
Contributor

❌ Gradle check result for 3f49bd6: 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 ccaebc3: null

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 0a0fa31: SUCCESS

sawansri added 11 commits July 28, 2025 22:35
Signed-off-by: Sawan Srivastava <[email protected]>
Signed-off-by: Sawan Srivastava <[email protected]>
Signed-off-by: Sawan Srivastava <[email protected]>
Signed-off-by: Sawan Srivastava <[email protected]>
Signed-off-by: Sawan Srivastava <[email protected]>
Signed-off-by: Sawan Srivastava <[email protected]>
@github-actions
Copy link
Contributor

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

@sawansri
Copy link
Contributor Author

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

Flaky test: #17937

Signed-off-by: Sawan Srivastava <[email protected]>
@github-actions
Copy link
Contributor

❌ Gradle check result for 76b2863: 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 76b2863: SUCCESS

@github-project-automation github-project-automation bot moved this from In-Review to In Progress in Performance Roadmap Jul 29, 2025
@prudhvigodithi
Copy link
Member

@kkewwei @sandeshkr419 are we good this PR?

Copy link
Contributor

@kkewwei kkewwei left a comment

Choose a reason for hiding this comment

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

LGTM

@prudhvigodithi prudhvigodithi merged commit b0417f3 into opensearch-project:main Jul 29, 2025
36 of 65 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Performance Roadmap Jul 29, 2025
sunqijun1 pushed a commit to sunqijun1/OpenSearch that referenced this pull request Aug 4, 2025
…pensearch-project#18511)

* Added approximation support for range queries with now in date field

Signed-off-by: Sawan Srivastava <[email protected]>

* Updated tests to fit new query hierarchy

Signed-off-by: Sawan Srivastava <[email protected]>

* refactored approximation logic for DateRangeIncludingNowQuery

Signed-off-by: Sawan Srivastava <[email protected]>

* added validation test for DateRangeIncludingNowQuery approximation

Signed-off-by: Sawan Srivastava <[email protected]>

* fixed percolation query analyzer logic to check for DateRangeIncludingNowQuery

Signed-off-by: Sawan Srivastava <[email protected]>

* updated DateFieldTypeTests to reflect new DateRangeIncludingNow query structure

Signed-off-by: Sawan Srivastava <[email protected]>

* refactored date range query to use overloaded function and cleaned up percolation subquery visitor logic

Signed-off-by: Sawan Srivastava <[email protected]>

* cleaned up testApproximateVsExactQuery function signature

Signed-off-by: Sawan Srivastava <[email protected]>

* Rerun gradle check

Signed-off-by: Sawan Srivastava <[email protected]>

* Removed redundancy in DateRangeIncludingNow approximation logic

Signed-off-by: Sawan Srivastava <[email protected]>

* Refactored DateRangeIncludingNowTests for conciseness

Signed-off-by: Sawan Srivastava <[email protected]>

* applied spotless

Signed-off-by: Sawan Srivastava <[email protected]>

* Removed unused handleNow method

Signed-off-by: Sawan Srivastava <[email protected]>

* refactored approximation wrapping logic

Signed-off-by: Sawan Srivastava <[email protected]>

* applied spotless

Signed-off-by: Sawan Srivastava <[email protected]>

* Refactored tests to use DateFieldType

Signed-off-by: Sawan Srivastava <[email protected]>

* applied spotless

Signed-off-by: Sawan Srivastava <[email protected]>

* Refactored DateRangeIncludingNow tests to reflect new parameterized versions

Signed-off-by: Sawan Srivastava <[email protected]>

* update CHANGELOG.md

Signed-off-by: Sawan Srivastava <[email protected]>

* rerun gradle check

Signed-off-by: Sawan Srivastava <[email protected]>

---------

Signed-off-by: Sawan Srivastava <[email protected]>
Signed-off-by: sunqijun.jun <[email protected]>
tandonks pushed a commit to tandonks/OpenSearch that referenced this pull request Aug 5, 2025
…pensearch-project#18511)

* Added approximation support for range queries with now in date field

Signed-off-by: Sawan Srivastava <[email protected]>

* Updated tests to fit new query hierarchy

Signed-off-by: Sawan Srivastava <[email protected]>

* refactored approximation logic for DateRangeIncludingNowQuery

Signed-off-by: Sawan Srivastava <[email protected]>

* added validation test for DateRangeIncludingNowQuery approximation

Signed-off-by: Sawan Srivastava <[email protected]>

* fixed percolation query analyzer logic to check for DateRangeIncludingNowQuery

Signed-off-by: Sawan Srivastava <[email protected]>

* updated DateFieldTypeTests to reflect new DateRangeIncludingNow query structure

Signed-off-by: Sawan Srivastava <[email protected]>

* refactored date range query to use overloaded function and cleaned up percolation subquery visitor logic

Signed-off-by: Sawan Srivastava <[email protected]>

* cleaned up testApproximateVsExactQuery function signature

Signed-off-by: Sawan Srivastava <[email protected]>

* Rerun gradle check

Signed-off-by: Sawan Srivastava <[email protected]>

* Removed redundancy in DateRangeIncludingNow approximation logic

Signed-off-by: Sawan Srivastava <[email protected]>

* Refactored DateRangeIncludingNowTests for conciseness

Signed-off-by: Sawan Srivastava <[email protected]>

* applied spotless

Signed-off-by: Sawan Srivastava <[email protected]>

* Removed unused handleNow method

Signed-off-by: Sawan Srivastava <[email protected]>

* refactored approximation wrapping logic

Signed-off-by: Sawan Srivastava <[email protected]>

* applied spotless

Signed-off-by: Sawan Srivastava <[email protected]>

* Refactored tests to use DateFieldType

Signed-off-by: Sawan Srivastava <[email protected]>

* applied spotless

Signed-off-by: Sawan Srivastava <[email protected]>

* Refactored DateRangeIncludingNow tests to reflect new parameterized versions

Signed-off-by: Sawan Srivastava <[email protected]>

* update CHANGELOG.md

Signed-off-by: Sawan Srivastava <[email protected]>

* rerun gradle check

Signed-off-by: Sawan Srivastava <[email protected]>

---------

Signed-off-by: Sawan Srivastava <[email protected]>
vinaykpud pushed a commit to vinaykpud/OpenSearch that referenced this pull request Sep 26, 2025
…pensearch-project#18511)

* Added approximation support for range queries with now in date field

Signed-off-by: Sawan Srivastava <[email protected]>

* Updated tests to fit new query hierarchy

Signed-off-by: Sawan Srivastava <[email protected]>

* refactored approximation logic for DateRangeIncludingNowQuery

Signed-off-by: Sawan Srivastava <[email protected]>

* added validation test for DateRangeIncludingNowQuery approximation

Signed-off-by: Sawan Srivastava <[email protected]>

* fixed percolation query analyzer logic to check for DateRangeIncludingNowQuery

Signed-off-by: Sawan Srivastava <[email protected]>

* updated DateFieldTypeTests to reflect new DateRangeIncludingNow query structure

Signed-off-by: Sawan Srivastava <[email protected]>

* refactored date range query to use overloaded function and cleaned up percolation subquery visitor logic

Signed-off-by: Sawan Srivastava <[email protected]>

* cleaned up testApproximateVsExactQuery function signature

Signed-off-by: Sawan Srivastava <[email protected]>

* Rerun gradle check

Signed-off-by: Sawan Srivastava <[email protected]>

* Removed redundancy in DateRangeIncludingNow approximation logic

Signed-off-by: Sawan Srivastava <[email protected]>

* Refactored DateRangeIncludingNowTests for conciseness

Signed-off-by: Sawan Srivastava <[email protected]>

* applied spotless

Signed-off-by: Sawan Srivastava <[email protected]>

* Removed unused handleNow method

Signed-off-by: Sawan Srivastava <[email protected]>

* refactored approximation wrapping logic

Signed-off-by: Sawan Srivastava <[email protected]>

* applied spotless

Signed-off-by: Sawan Srivastava <[email protected]>

* Refactored tests to use DateFieldType

Signed-off-by: Sawan Srivastava <[email protected]>

* applied spotless

Signed-off-by: Sawan Srivastava <[email protected]>

* Refactored DateRangeIncludingNow tests to reflect new parameterized versions

Signed-off-by: Sawan Srivastava <[email protected]>

* update CHANGELOG.md

Signed-off-by: Sawan Srivastava <[email protected]>

* rerun gradle check

Signed-off-by: Sawan Srivastava <[email protected]>

---------

Signed-off-by: Sawan Srivastava <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working Search:Performance v3.2.0

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[BUG] Range query with now on date fields skips Approximation Path

5 participants