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

Correct NeuralQueryBuilder doEquals() and doHashCode(). #1045

Merged
merged 1 commit into from
Jan 9, 2025

Conversation

bzhangam
Copy link
Contributor

@bzhangam bzhangam commented Dec 27, 2024

Description

NeuralQueryBuilder doEquals() and doHashCode() don't consider all the parameters so correct them to ensure those functions can work correctly if they are used for cache function.

Also fix the issue that we don't handle the queryImage properly. We should handle it similar to the queryText.

Related Issues

Resolves #1010

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff.
  • 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.

@junqiu-lei
Copy link
Member

Please check the failed CIs and update the changelog file.

@bzhangam bzhangam closed this Dec 31, 2024
@bzhangam bzhangam reopened this Dec 31, 2024
@martin-gaievski
Copy link
Member

Please check the failed CIs and update the changelog file.

Blocking issue is fixed, you can use CI after rebasing on main branch

@martin-gaievski
Copy link
Member

martin-gaievski commented Jan 6, 2025

CI actions are failing for the changes in this PR, please check:

 - org.opensearch.neuralsearch.query.HybridQueryBuilderTests.testHashAndEquals_whenSameOrIdenticalObject_thenReturnEqual
 - org.opensearch.neuralsearch.query.NeuralQueryBuilderTests.testHashAndEquals

@bzhangam bzhangam reopened this Jan 8, 2025
@bzhangam bzhangam closed this Jan 8, 2025
@bzhangam bzhangam reopened this Jan 8, 2025
@bzhangam bzhangam closed this Jan 8, 2025
@bzhangam bzhangam reopened this Jan 8, 2025
@bzhangam bzhangam closed this Jan 8, 2025
@bzhangam bzhangam reopened this Jan 8, 2025
@bzhangam bzhangam closed this Jan 8, 2025
@bzhangam bzhangam reopened this Jan 8, 2025
@bzhangam bzhangam closed this Jan 8, 2025
@bzhangam bzhangam reopened this Jan 8, 2025
@bzhangam bzhangam closed this Jan 8, 2025
@bzhangam bzhangam reopened this Jan 8, 2025
@bzhangam bzhangam closed this Jan 8, 2025
@bzhangam bzhangam reopened this Jan 8, 2025
@bzhangam bzhangam closed this Jan 8, 2025
@bzhangam bzhangam reopened this Jan 8, 2025
@bzhangam bzhangam closed this Jan 8, 2025
@bzhangam bzhangam reopened this Jan 8, 2025
@bzhangam bzhangam closed this Jan 8, 2025
@bzhangam bzhangam reopened this Jan 8, 2025
@bzhangam bzhangam closed this Jan 8, 2025
@bzhangam bzhangam reopened this Jan 8, 2025
Copy link

codecov bot commented Jan 9, 2025

Codecov Report

Attention: Patch coverage is 88.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 80.21%. Comparing base (6ad6546) to head (966fe1d).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...nsearch/neuralsearch/query/NeuralQueryBuilder.java 86.95% 1 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1045      +/-   ##
============================================
+ Coverage     80.14%   80.21%   +0.07%     
- Complexity     1136     1141       +5     
============================================
  Files            87       87              
  Lines          3934     3953      +19     
  Branches        662      666       +4     
============================================
+ Hits           3153     3171      +18     
  Misses          532      532              
- Partials        249      250       +1     

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

@heemin32 heemin32 merged commit ec6b30d into opensearch-project:main Jan 9, 2025
131 of 156 checks passed
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.x 2.x
# Navigate to the new working tree
cd .worktrees/backport-2.x
# Create a new branch
git switch --create backport/backport-1045-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 ec6b30d1bbea94e7d96d2f2232f510f775047293
# Push it to GitHub
git push --set-upstream origin backport/backport-1045-to-2.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-1045-to-2.x.

martin-gaievski pushed a commit that referenced this pull request Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x Label will add auto workflow to backport PR to 2.x branch v2.19.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants