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

Request to add a custom comparators #162

Open
fmvin opened this issue Dec 1, 2024 · 2 comments
Open

Request to add a custom comparators #162

fmvin opened this issue Dec 1, 2024 · 2 comments

Comments

@fmvin
Copy link

fmvin commented Dec 1, 2024

There are tasks to read timeseries data from primary rocksdb stored in special column family.
Would be nece to have such extra comparator. For example, to create a predefined comparator to work with timestamp keys.

@Congyuwang
Copy link
Collaborator

How is your timestamp structured, and what specific comparator logic do you need (bitwise)? And also, if this is to be implemented, what are some of the commonly used comparators would you suggest to be added? Thanks.

@fmvin
Copy link
Author

fmvin commented Dec 2, 2024

My timestamp is an int64 value representing a Unix timestamp in milliseconds. The user key consists of a string with an 8-byte timestamp appended as a suffix.

The suggestion is to implement the following comparators, as described in comparator.h:

  • BytewiseComparatorWithU64Ts
  • ReverseBytewiseComparatorWithU64Ts

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

No branches or pull requests

2 participants