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

Flatbuffer definitions for index queries #821

Merged
merged 6 commits into from
Aug 16, 2021

Conversation

yiwen-wong
Copy link

For preview we are only supporting POINT_READs,
Eventually support for UPPER, LOWER, EQUALS range query will be supported.

@yiwen-wong yiwen-wong requested review from chuan and senderista August 10, 2021 19:21
Copy link
Contributor

@senderista senderista left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just formatting nits.

@@ -29,9 +29,19 @@ table table_scan_info_t {
type_id: uint64;
}

enum index_query_type_t:uint8 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

space after :

}

table index_range_query_t {
query_type : index_query_type_t;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use existing convention foo: bar (this shows we need a precommit hook to autoformat .fbs files, because I hate bringing up these nits).

table index_scan_info_t {
index_id: uint64;
txn_id : uint64;
queries : [index_range_query_t];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need multiple queries per index scan?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To specify upper bound and lower bound mostly

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Come to think of it I can do a real union type for that one.

@senderista
Copy link
Contributor

Long-term question: for range queries, do we want to store sortkeys in the index rather than raw key values? If we can use binary comparison rather than locality-sensitive collation, that could potentially be a huge perf win.

@yiwen-wong yiwen-wong merged commit 0709c4b into master Aug 16, 2021
@yiwen-wong yiwen-wong deleted the yiwen_index_range_query_pr branch August 16, 2021 20:31
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