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

Feature: Range queries #312

Open
stevefan1999-personal opened this issue Mar 19, 2023 · 1 comment
Open

Feature: Range queries #312

stevefan1999-personal opened this issue Mar 19, 2023 · 1 comment
Labels
C-enhancement New feature or request

Comments

@stevefan1999-personal
Copy link

Description

Support range queries like TiKV: https://tikv.org/docs/dev/develop/rawkv/scan/

client.put(ByteString.copyFromUtf8("k1"), ByteString.copyFromUtf8("v1"));
client.put(ByteString.copyFromUtf8("k2"), ByteString.copyFromUtf8("v2"));
client.put(ByteString.copyFromUtf8("k3"), ByteString.copyFromUtf8("v3"));
client.put(ByteString.copyFromUtf8("k4"), ByteString.copyFromUtf8("v4"));

// scan with limit
int limit = 1000;
List<Kvrpcpb.KvPair> list = client.scan(ByteString.copyFromUtf8("k1"), ByteString.copyFromUtf8("k5"), limit);
for(Kvrpcpb.KvPair pair : list) {
    System.out.println(pair);
}
@stevefan1999-personal stevefan1999-personal added the C-enhancement New feature or request label Mar 19, 2023
@ohsayan
Copy link
Member

ohsayan commented Apr 1, 2023

Range queries will require a huge change in the fundamental data structures that we use. The one you see in the tree has already been replaced but even the new one that I've written (in the octave branch which isn't public yet) doesn't support ordered access.

I'm currently working on stabilizing the engine's implementation for octave. I think once we have a stable API is when we should revisit this. The issue is with efficient indexes for ordered accesses which matches the design goals of Skytable.

One more thing to note: it is actually fundamental that we support range queries since it is far too useful to ignore. Hence, we'll need to come back to this soon.

@ohsayan ohsayan added this to the 0.8.2 milestone Mar 13, 2024
@ohsayan ohsayan removed this from the 0.8.2 milestone Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants