-
Notifications
You must be signed in to change notification settings - Fork 2
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
Question on usage #40
Comments
So you would be using a I think it would possibly work if you did One underlying assumption I have is that the byte representation of Somewhat off-topic questions:
When you insert a new sample into a chunk, do you update the |
Yes.
In this case I'm specifically looking at upserts. Imagine a pub struct TimeSeries {
pub start: Timestamp,
pub end: Timestamp,
pub chunks: TreeMap<Timestamp, Chunk>
} Checking an incoming |
One thing to note if you're using an use blart::{TreeMap, Mapped, ToIBE, BytesMapping};
// assumption
type Timestamp = i64;
type Map = TreeMap<Mapped<ToIBE, Timestamp>, Chunk> This does make keys a little more difficult to use sadly, but not impossible. Let me know about any difficulties in this part or any proposals to make this translation more transparent. Its definitely a rough area of the crate |
I have another use-case i'd like to use
blart
for. Assume I have a series of chunks bounded by timestamp and containing samples.I store multiple chunks per timeseries, and later I need to upsert a
Sample
in a chunk. For this i need to efficiently locate a chunk into which to insert the sample.It seems to me that
chunks.range(new_sample.timestamp..)
won't do the trick, but I can't see any means short of iteration from the start.Edit: chunks would be indexed by
chunk.start
The text was updated successfully, but these errors were encountered: