-
Notifications
You must be signed in to change notification settings - Fork 12
feat(query-engine): prototype streaming query engine #360
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
base: main
Are you sure you want to change the base?
Changes from all commits
02947b3
74c7753
e8b1f33
436f2d2
882c591
c521d48
3dd5ee5
3d43a6d
86e8db5
bf8b523
1b2924a
a461ae1
0e3e7d8
c30509f
d2b697c
5b47f6e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,6 +26,8 @@ service StoreApi { | |
| rpc Fetch(FetchRequest) returns (stream BinaryData) {} | ||
|
|
||
| rpc Status(StatusRequest) returns (StatusResponse) {} | ||
|
|
||
| rpc OnePhaseSearch(OnePhaseSearchRequest) returns (stream OnePhaseSearchResponse) {} | ||
| } | ||
|
|
||
| message BulkRequest { | ||
|
|
@@ -145,6 +147,7 @@ enum SearchErrorCode { | |
| TOO_MANY_FRACTION_TOKENS = 6; | ||
| TOO_MANY_FIELD_VALUES = 7; | ||
| MEMORY_LIMIT_EXCEEDED = 8; | ||
| DISABLED = 9; | ||
| } | ||
|
|
||
| message StartAsyncSearchRequest { | ||
|
|
@@ -244,12 +247,13 @@ message IdWithHint { | |
| string hint = 2; | ||
| } | ||
|
|
||
| message FieldsFilter { | ||
| repeated string fields = 1; | ||
| // see seqproxyapi.FetchRequest.FieldsFilter.allow_list for details. | ||
| bool allow_list = 2; | ||
| } | ||
|
|
||
| message FetchRequest { | ||
| message FieldsFilter { | ||
| repeated string fields = 1; | ||
| // see seqproxyapi.FetchRequest.FieldsFilter.allow_list for details. | ||
| bool allow_list = 2; | ||
| } | ||
| repeated string ids = 1; | ||
| bool explain = 3; | ||
| repeated IdWithHint ids_with_hints = 4; | ||
|
|
@@ -264,3 +268,60 @@ message StatusRequest {} | |
| message StatusResponse { | ||
| google.protobuf.Timestamp oldest_time = 1; | ||
| } | ||
|
|
||
| message OnePhaseSearchRequest { | ||
| string query = 1; | ||
| google.protobuf.Timestamp from = 2; | ||
| google.protobuf.Timestamp to = 3; | ||
| int64 size = 4; | ||
| int64 offset = 5; | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TODO: we need to establish the API for query engine. Currently, I can set both
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TODO: |
||
| bool explain = 6; | ||
| bool with_total = 7; | ||
| Order order = 8; | ||
| string offset_id = 9; | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TODO: |
||
| FieldsFilter fields_filter = 10; | ||
| } | ||
|
|
||
| message OnePhaseSearchResponse { | ||
| oneof ResponseType { | ||
| Header header = 1; | ||
| RecordsBatch batch = 2; | ||
| } | ||
| } | ||
|
|
||
| message Header { | ||
| Metadata metadata = 1; | ||
| repeated Typing typing = 2; | ||
| } | ||
|
|
||
| message Metadata { | ||
| uint64 total = 1; | ||
| SearchErrorCode code = 2; | ||
| repeated string errors = 3; | ||
| optional ExplainEntry explain = 4; | ||
| } | ||
|
|
||
| enum DataType { | ||
| BYTES = 0; | ||
| RAW_DOCUMENT = 1; | ||
| STRING = 2; | ||
| UINT32 = 3; | ||
| UINT64 = 4; | ||
| INT32 = 5; | ||
| INT64 = 6; | ||
| FLOAT64 = 7; | ||
| // TODO: array data types: StringArray, Uin64Array, Float64Array etc. | ||
| } | ||
|
|
||
| message Typing { | ||
| string title = 1; | ||
| DataType type = 2; | ||
| } | ||
|
|
||
| message RecordsBatch { | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TODO: columnar batches will not aligh will with that model. But currently it's ok. Probably batch format will be just raw bytes soon. |
||
| repeated Record records = 1; | ||
| } | ||
|
|
||
| message Record { | ||
| repeated bytes raw_data = 1; | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -300,6 +300,8 @@ type Config struct { | |
| // Specify how many tokens can be checked using regular expressions. | ||
| // If zero then there is no limit. | ||
| MaxRegexTokensCheck int `config:"max_regex_tokens_check" default:"0"` | ||
| // EnableOnePhaseSearch enanles experimental one phase search method that supports new query engine. | ||
| EnableOnePhaseSearch bool `config:"enable_one_phase_search"` | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Even with disabled toggle I can issue a new query |
||
| } `config:"experimental"` | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -111,4 +111,5 @@ var ( | |
| ErrTooManyFractionTokens = errors.New("aggregation has too many fraction tokens") | ||
| ErrTooManyFractionsHit = errors.New("too many fractions hit") | ||
| ErrMemoryLimitExceeded = errors.New("memory limit exceeded") | ||
| ErrResourceDisabled = errors.New("resource is disabled") | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what's the concrete meaning of |
||
| ) | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duplicating an issue here - currently we must set
sizeeven in presence oflimitpipe.