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
String comparison functions #1857
Comments
Thanks for the feature request, @etcd @tomatolog As discussed, please prepare instructions for @etcd detailing the areas that require modifications, as they would like to implement these changes themselves. |
In general you need create a new filter instance at sphCreateFilter similar to FilterString_c but one that can compare strings with lesser and greater operators. You also should add new members to CommonFilterSettings_t for parser to fill. The parser located at bison and flex files I'd start filter_item And after all works well locally you need to add send and receive of the new filter structure into distributed index SearchRequestBuilder_c::SendQuery and SearchReplyParser_c::ParseReply Feel free to ask for any help |
Hey @tomatolog @sanikolaev, I've spent a few hours familiarizing myself with the codebase. I looked into modeling these string filters after For example, in several places, ranges are assumed to be numerical (either So implementing these string filters the same way seems like a somewhat error-prone route, given the number of places that might make this assumption. Not to mention there are more subtle cases where ranges are assumed to be numerical, like in There might be simpler ways of adding these string filters that don't involve expanding the existing "range" abstraction and having to ensure that all semantics continue to hold. I'll defer to your judgements. |
I'd add a new FILTER enum similar to |
I'd find it helpful if you could also outline which files are deprecated/unused and should not be touched (if there's an easy way to do that). For example, is Also, how about In general, it might be a good idea to go through an anti-entropy effort to remove dead code and make development easier (esp for outside contributors). |
Hi @tomatolog , please check out the draft PR. I've made updates to all places mentioned in your outline. I've left it as a draft PR because I think there may be additional changes necessary that I would like to double check first. |
you do not need to implement any API or the you need just to implement code:
It also worth to add test case as a new |
implemented at PR#1900 |
Is your feature request related to a problem? Please describe.
String comparison functions do not exist in Manticore (other than equality). It is not possible to perform the following query:
Describe the solution you'd like
The implementation of the following string comparison operators: <, <=, >, >=.
Additional context
This functionality is essential to implement relatively mainstream functionalities, such as cursor-based pagination on string columns.
The text was updated successfully, but these errors were encountered: