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

Mutable numeric index #2653

Merged
merged 5 commits into from
Oct 3, 2023
Merged

Mutable numeric index #2653

merged 5 commits into from
Oct 3, 2023

Conversation

IvanPleshkov
Copy link
Contributor

@IvanPleshkov IvanPleshkov commented Sep 13, 2023

Numeric field index refactoring. Required changes for #2666

struct NumericIndex was converted into enum NumericIndex with only one variant Mutable (#2666 intriduces Immutable variant, I hope in future we will implement Mmap variant too).

Mutable variant contains all fields from the old struct NumericIndex, and has the same load/delete/add methods as the old ones. All filters/estimations are the same but with changed access to old structure fields. Now it was added new methods to access Mutable fields:

NumericIndex::get_db_wrapper
NumericIndex::get_histogram
NumericIndex::get_points_count
NumericIndex::get_values_count
NumericIndex::get_values
NumericIndex::get_max_values_per_point

Also the whole file numeric_index.rs was separated into parts with NumericIndex, mutable state, and tests. It's the same strategy that was applied to Map Index.

All Submissions:

  • Contributions should target the dev branch. Did you create your branch from dev?
  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

New Feature Submissions:

  1. Does your submission pass tests?
  2. Have you formatted your code locally using cargo +nightly fmt --all command prior to submission?
  3. Have you checked your code using cargo clippy --all --all-features command?

Changes to Core Features:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully ran tests with your changes locally?

@IvanPleshkov IvanPleshkov force-pushed the mutable-numeric-index branch from 78f6f27 to f39b8df Compare October 2, 2023 09:10
@IvanPleshkov IvanPleshkov merged commit 0623196 into dev Oct 3, 2023
@IvanPleshkov IvanPleshkov deleted the mutable-numeric-index branch October 3, 2023 09:48
generall pushed a commit that referenced this pull request Oct 6, 2023
* mutable numeric index

* mutable numeric index

* apply changes from dev

* fix build

* remove obsolete allow
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.

2 participants