Skip to content
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

[Sort] Sending missing values in comparator instead sending null #11196

Merged
merged 2 commits into from
Nov 16, 2023

Conversation

gashutos
Copy link
Contributor

Description

NumericComparator uses missingValue to determine if to apply BKD based skipping logic in case missingValue is not competitive. If missingValue is competitive, we cant apply this optimization as per the comment.
If we dont pass missing value here, it might hit the corner case like here #9537. We fixed this in Lucene, apache/lucene#12520, but didnt add integ tests here in OpenSearch.

Related Issues

#10998

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Failing checks are inspected and point to the corresponding known issue(s) (See: Troubleshooting Failing Builds)
  • Commits are signed per the DCO using --signoff
  • Commit changes are listed out in CHANGELOG.md file (See: Changelog)
  • Public documentation issue/PR created

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.

@gashutos
Copy link
Contributor Author

@reta @backslasht @kkmr
This is from this conversation
#11024 (comment)

Copy link
Contributor

Compatibility status:

Checks if related components are compatible with change 9b0af16

Incompatible components

Incompatible components: [https://github.com/opensearch-project/performance-analyzer.git]

Skipped components

Compatible components

Compatible components: [https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/reporting.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/opensearch-oci-object-storage.git, https://github.com/opensearch-project/custom-codecs.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/sql.git]

Copy link
Contributor

❕ Gradle check result for 9b0af16: UNSTABLE

  • TEST FAILURES:
      1 org.opensearch.http.SearchRestCancellationIT.testAutomaticCancellationDuringFetchPhase

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

Copy link

codecov bot commented Nov 14, 2023

Codecov Report

Attention: 46 lines in your changes are missing coverage. Please review.

Comparison is base (8077a26) 71.12% compared to head (9b0af16) 71.17%.
Report is 3 commits behind head on main.

Files Patch % Lines
.../index/search/comparators/HalfFloatComparator.java 0.00% 29 Missing ⚠️
...eldcomparator/HalfFloatValuesComparatorSource.java 25.00% 12 Missing ⚠️
.../fieldcomparator/DoubleValuesComparatorSource.java 0.00% 0 Missing and 1 partial ⚠️
...a/fieldcomparator/FloatValuesComparatorSource.java 0.00% 0 Missing and 1 partial ⚠️
...ata/fieldcomparator/IntValuesComparatorSource.java 0.00% 0 Missing and 1 partial ⚠️
...ta/fieldcomparator/LongValuesComparatorSource.java 0.00% 0 Missing and 1 partial ⚠️
...comparator/UnsignedLongValuesComparatorSource.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #11196      +/-   ##
============================================
+ Coverage     71.12%   71.17%   +0.04%     
- Complexity    58788    58805      +17     
============================================
  Files          4883     4885       +2     
  Lines        277152   277199      +47     
  Branches      40281    40285       +4     
============================================
+ Hits         197134   197287     +153     
+ Misses        63545    63462      -83     
+ Partials      16473    16450      -23     

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

Copy link
Member

@dblock dblock left a comment

Choose a reason for hiding this comment

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

Looks great, nice and clean.

@dblock dblock merged commit dc5a299 into opensearch-project:main Nov 16, 2023
84 of 113 checks passed
@dblock
Copy link
Member

dblock commented Nov 16, 2023

Backport manually with the proper version number checks in YAML tests?

gashutos added a commit to gashutos/OpenSearch that referenced this pull request Nov 17, 2023
…nsearch-project#11196)

* [Sort] Sending missing values in comparator instead sending null

Signed-off-by: Chaitanya Gohel <[email protected]>

* Removing missing value outdated comments

Signed-off-by: Chaitanya Gohel <[email protected]>

---------

Signed-off-by: Chaitanya Gohel <[email protected]>
@gashutos
Copy link
Contributor Author

gashutos commented Nov 17, 2023

Looks great, nice and clean.

Thanks @dblock @backslasht !!
Raised the backport changing the test suported version. (its in 2nd commit)
PR #11250

fahadshamiinsta pushed a commit to fahadshamiinsta/OpenSearch270 that referenced this pull request Dec 4, 2023
…nsearch-project#11196)

* [Sort] Sending missing values in comparator instead sending null

Signed-off-by: Chaitanya Gohel <[email protected]>

* Removing missing value outdated comments

Signed-off-by: Chaitanya Gohel <[email protected]>

---------

Signed-off-by: Chaitanya Gohel <[email protected]>
rayshrey pushed a commit to rayshrey/OpenSearch that referenced this pull request Mar 18, 2024
…nsearch-project#11196)

* [Sort] Sending missing values in comparator instead sending null

Signed-off-by: Chaitanya Gohel <[email protected]>

* Removing missing value outdated comments

Signed-off-by: Chaitanya Gohel <[email protected]>

---------

Signed-off-by: Chaitanya Gohel <[email protected]>
shiv0408 pushed a commit to Gaurav614/OpenSearch that referenced this pull request Apr 25, 2024
…nsearch-project#11196)

* [Sort] Sending missing values in comparator instead sending null

Signed-off-by: Chaitanya Gohel <[email protected]>

* Removing missing value outdated comments

Signed-off-by: Chaitanya Gohel <[email protected]>

---------

Signed-off-by: Chaitanya Gohel <[email protected]>
Signed-off-by: Shivansh Arora <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants