-
Notifications
You must be signed in to change notification settings - Fork 83
clp-s: Handle cases where clp-string query-parsing falls back to decompress + match (fixes #403). #407
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
Conversation
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.
Nice work. A few minor comments.
#include "../ArchiveReader.hpp" | ||
#include "../FileWriter.hpp" | ||
#include "../ReaderUtils.hpp" | ||
#include "../Utils.hpp" |
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.
I think StringUtils
still needs this as a direct include.
// don't't add more wildcards. Likewise if it already contains some wildcards | ||
// we do not add more | ||
Grep::process_raw_query( | ||
m_string_query_map[query_string] = std::move(Grep::process_raw_query( |
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.
Shall we switch to emplace
instead?
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.
One small suggestion.
For the PR title, how about:
clp-s: Handle cases where clp-string query-parsing falls back to decompress + match (fixes #403).
bool is_var; | ||
// FIXME: may want to use non-heuristic method of tokenizing query | ||
// if (use_heuristic) { | ||
|
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.
References
#403
Description
Previously, when a query did not contain a subquery, it was not evaluated in clp-s. However, in cases where
matchability = SubQueryMatchabilityResult::SupercedesAllSubQueries
, this caused an issue. This PR fixes the bug, which indirectly resolves issue #403. The primary code change aligns clp-s with the behavior of clp inGrep::process_raw_query
. The relevant code inclp_s/search/Output.cpp
has also been updated.Validation performed