-
Notifications
You must be signed in to change notification settings - Fork 24
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
feat(stencil): add support for search API #92
Conversation
- add RPC call `SearchSchemas` - define messages `SearchSchemasRequest` and `SearchSchemasResponse`
* modify `SearchSchemas` API to global `Search` API * modify `SearchSchemasRequest` * modify `SearchSchemasResponse` to include search `meta`
odpf/stencil/v1beta1/stencil.proto
Outdated
string schema_id = 2; | ||
int32 version_id = 3; | ||
string query = 4; | ||
bool all = 5; |
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.
@ramey What is the role of all here?
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.
all
returns matches from all the versions, by default only the matches from the latest versions are returned
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.
Make sense. Is there some better name we can think of for this? At first look I got confused that it is related to pagination,
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.
how does scan_all_versions
sound?
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.
what we need is oneof between version_id
and all
fields. User can't set both fields together right? If we do allow setting two fields then, which field should take precedence?
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.
The problem is while processing the value in the application. In case no value has been specified as it is a bool
it defaults to false
and there is no way to find out whether it is explicitly given by the user or default bool
value.
Agreed with oneof
, will change that.
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.
make sense. In that case, another name of all could be history/past
as well.
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.
@ramey @harikrishnakanchi lets go with history then?
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.
@ravisuhag I am thinking of going with history
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.
@ramey cool.
* change `all` param in `SearchRequest` to `history` * use oneof for `version_id` and `history` code review by @ravisuhag and @harikrishnakanchi
Search
SearchRequest
,SearchResponse
andSearchMeta