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

add check for number of elements in diskann #104

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

inabao
Copy link
Collaborator

@inabao inabao commented Oct 30, 2024

No description provided.

@inabao inabao requested review from wxyucs and LHT129 October 30, 2024 07:46
@inabao inabao self-assigned this Oct 30, 2024
@inabao inabao requested a review from jiaweizone as a code owner October 30, 2024 07:46
@inabao inabao added the kind/improvement Code improvements (variable/function renaming, refactoring, etc. ) label Oct 30, 2024
Comment on lines 229 to 230
CHECK_ARGUMENT(data_num >= 2,
fmt::format("base.num_elements({}) must be greater than 2", data_num));
Copy link
Collaborator

Choose a reason for hiding this comment

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

is it related to any bug or issue?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It is not relate any bugs. We have constrained this matter in functests, but we haven't done any checks in the code, which is not acceptable.

Copy link
Collaborator

Choose a reason for hiding this comment

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

should we add some unit tests or func tests to cover this new behavior?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I have added the related unit test.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@inabao I saw that the minimum number of elements is changed to 1. What is the consideration?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

>1 == >=2, so we should keep the minimum number of elements equal to 2 and greater than 1

Signed-off-by: jinjiabao.jjb <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/improvement Code improvements (variable/function renaming, refactoring, etc. ) size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants