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

Refactor query result - [MOD-5530] #412

Merged
merged 22 commits into from
Aug 13, 2023
Merged

Conversation

GuyAv46
Copy link
Collaborator

@GuyAv46 GuyAv46 commented Aug 1, 2023

Describe the changes in the pull request

Remove the arr_cpp.h array implementation and moved to use vectors.
Also, make VecSimQueryResult_List an opaque type and change the API to return a pointer to it instead of by value, and rename it to VecSimQueryReply.

This PR enables compiling the library with GCC 12 and 13 as well.

Which issues this PR fixes

  1. Compilation error #414
  2. MOD-5524

Main objects this PR modified

  1. remove the arr_cpp.h implementation
  2. changes in API (internally and external)

Mark if applicable

  • This PR introduces API changes
  • This PR introduces serialization changes

@GuyAv46 GuyAv46 changed the base branch from main to guyav-minmax_heap August 1, 2023 10:44
@GuyAv46 GuyAv46 force-pushed the guyav-refactor_query_result branch from 248b7bf to fb8df57 Compare August 3, 2023 13:03
@GuyAv46 GuyAv46 changed the base branch from guyav-minmax_heap to main August 3, 2023 13:03
@GuyAv46 GuyAv46 requested a review from meiravgri August 3, 2023 13:03
@GuyAv46 GuyAv46 marked this pull request as ready for review August 3, 2023 13:07
@codecov
Copy link

codecov bot commented Aug 3, 2023

Codecov Report

Patch coverage: 98.39% and project coverage change: -0.08% ⚠️

Comparison is base (3f25aa2) 95.63% compared to head (1542c38) 95.56%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #412      +/-   ##
==========================================
- Coverage   95.63%   95.56%   -0.08%     
==========================================
  Files          66       65       -1     
  Lines        4174     4079      -95     
==========================================
- Hits         3992     3898      -94     
+ Misses        182      181       -1     
Files Changed Coverage Δ
src/VecSim/batch_iterator.h 100.00% <ø> (ø)
src/VecSim/utils/vec_utils.h 78.57% <ø> (-8.39%) ⬇️
src/VecSim/vec_sim_common.h 100.00% <ø> (ø)
src/VecSim/vec_sim_interface.h 100.00% <ø> (ø)
src/VecSim/utils/vec_utils.cpp 78.88% <93.75%> (+1.50%) ⬆️
src/VecSim/algorithms/hnsw/hnsw_tiered.h 98.91% <95.74%> (ø)
src/VecSim/utils/query_result_utils.h 98.27% <97.05%> (-0.12%) ⬇️
.../VecSim/algorithms/brute_force/bf_batch_iterator.h 100.00% <100.00%> (ø)
...VecSim/algorithms/brute_force/bfm_batch_iterator.h 100.00% <100.00%> (ø)
...VecSim/algorithms/brute_force/bfs_batch_iterator.h 100.00% <100.00%> (ø)
... and 12 more

... and 2 files with indirect coverage changes

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

Copy link
Collaborator

@meiravgri meiravgri left a comment

Choose a reason for hiding this comment

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

will done, looks like a really tidious PR
I do think that some re-organization needs to be done in the query results files
i suggest renaming query_result.h to query_result_c_api and divided it into query_result, query_list, and query_iterator sections.
I didn't quite understand why is query_result_struct belongs to a seperated file, maybe a btter naming would clearify its purpose.

src/VecSim/query_results.h Outdated Show resolved Hide resolved
src/VecSim/query_results.cpp Show resolved Hide resolved
src/VecSim/query_result_struct.h Outdated Show resolved Hide resolved
src/VecSim/query_result_struct.h Outdated Show resolved Hide resolved
src/VecSim/algorithms/hnsw/hnsw_tiered.h Show resolved Hide resolved
@GuyAv46 GuyAv46 requested a review from meiravgri August 6, 2023 13:45
meiravgri
meiravgri previously approved these changes Aug 6, 2023
@GuyAv46 GuyAv46 requested a review from DvirDukhan August 6, 2023 14:01
@GuyAv46 GuyAv46 mentioned this pull request Aug 6, 2023
@GuyAv46 GuyAv46 changed the title Refactor query result Refactor query result - [MOD-5530]] Aug 7, 2023
@GuyAv46 GuyAv46 changed the title Refactor query result - [MOD-5530]] Refactor query result - [MOD-5530] Aug 7, 2023
@GuyAv46 GuyAv46 merged commit 622841e into main Aug 13, 2023
21 of 22 checks passed
@GuyAv46 GuyAv46 deleted the guyav-refactor_query_result branch August 13, 2023 06:00
GuyAv46 added a commit that referenced this pull request Aug 13, 2023
* remove `arr_cpp.h` and replace all its use cases with vectors

* remove `uninitialized` from an error worthy warning in spaces

* after rebase fixes

* build fixes

* another attempt

* more build fixes

* format

* fix bindings

* fix leak in test

* some review fixes

* remove `VecSimQueryResult` setters

* renaming `query_result_struct.h`

* generalize VecSimQueryResult_Iterator iterator

* improved and aligned result collecting loop in bf_batch_iterator

* use std::tie

* remove error suppressing (seems to be fixed)

* renaming `VecSimQueryResult` structures, introducing `VecSimQueryReply`

* reordering comment

* renaming

* tidy up sorting functions

* support for gcc-9

* rename VecSim_QueryResult_* codes
GuyAv46 added a commit that referenced this pull request Aug 13, 2023
* remove `arr_cpp.h` and replace all its use cases with vectors

* remove `uninitialized` from an error worthy warning in spaces

* after rebase fixes

* build fixes

* another attempt

* more build fixes

* format

* fix bindings

* fix leak in test

* some review fixes

* remove `VecSimQueryResult` setters

* renaming `query_result_struct.h`

* generalize VecSimQueryResult_Iterator iterator

* improved and aligned result collecting loop in bf_batch_iterator

* use std::tie

* remove error suppressing (seems to be fixed)

* renaming `VecSimQueryResult` structures, introducing `VecSimQueryReply`

* reordering comment

* renaming

* tidy up sorting functions

* support for gcc-9

* rename VecSim_QueryResult_* codes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants