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

Introduce a method on the Sorter to get the last inserted value of a key #32

Open
Kerollmops opened this issue Mar 23, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@Kerollmops
Copy link
Member

Kerollmops commented Mar 23, 2022

It could be useful to be able to get the latest value inserted in a sorter. There can be small lifetime issues but we can maybe just clone the value in a Vec for a first version.

The system could simply iterate on the in-memory values in revert order and then iterate over the reader in revert order until we find the requested entry. The algorithm should be O(N) for the in-memory search and O(log N) in the grenad files.

@Kerollmops Kerollmops added the enhancement New feature or request label Mar 23, 2022
@Kerollmops Kerollmops changed the title Introduce a method on the Sorter to get the latest inserted value of a key Introduce a method on the Sorter to get the last inserted value of a key Mar 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants