-
Notifications
You must be signed in to change notification settings - Fork 14
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
Replace rbtree with b+tree #25
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left some feedback
Also, looks like the CI build is failing because of lint issues with prettier |
Yeah, it was failing before because of the other PR, it was not able to reuse the same version tag. Still fixing it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a comment above the remove for non-unique/unique indices
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comments look good
This contains two changes.
ind.remove
will remove all values from the index, even if there are multiple items in that index (in case of non-unique index).In this fix we're splitting remove operation in two steps for non-unique indices:
There are possibly some performance implications to doing
array.filter
to remove the item, but could not come up with a better way of removing item without iterating over all array items -- yes, we can stop comparing pks after the first match, but we still need to go over the rest of items to finish copying the array.