Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6376 +/- ##
==========================================
+ Coverage 89.41% 89.56% +0.15%
==========================================
Files 252 254 +2
Lines 41678 41727 +49
Branches 3963 4000 +37
==========================================
+ Hits 37267 37374 +107
+ Misses 4354 4297 -57
+ Partials 57 56 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
raz-mon
left a comment
There was a problem hiding this comment.
Nicely and cleanly done! 💪
My main comment: With this implementation, we would need to traverse the AST again after the first traversal, done in QAST_CheckIsValid, which is probably ok for most queries, but not optimal. Consider implementing it such that we will perform all validations in one traversal, e.g., by invoking a check on a node according to some bit-field of checks relevant for this traversal, or something of that sort.
@raz-mon Thanks. |
src/query.c
Outdated
|
|
||
| // Handle children | ||
| if (withChildren && res == REDISMODULE_OK) { | ||
| if ((validationFlags & QAST_NO_WEIGHT_ATTRIBUTE) && n->opts.explicitWeight) { |
There was a problem hiding this comment.
Why is this validation done only for the withChildren && res == REDISMODULE_OK cases?
There was a problem hiding this comment.
We do not support query attributes for ismissing, right?
There was a problem hiding this comment.
It does not make sense, but the parser accept it:
127.0.0.1:6379> FT.explaincli myidx '(ismissing(@t))=>{$slop:2; $inorder:true; $weight:0.4}' withscores dialect 2
1) ISMISSING{t} => { $weight: 0.4; $slop: 2; $inorder: true; }
2)
127.0.0.1:6379> FT.explaincli myidx '(ismissing(@t))=>{$weight:0.4}' withscores dialect 2
1) ISMISSING{t} => { $weight: 0.4; }
``
raz-mon
left a comment
There was a problem hiding this comment.
LGTM 💪
Some small comments
The base branch was changed.
|
This PR is closed because its changes were applied to |
Description:
For HYBRID command add:
validationFlagsproperty in QueryAST to specify if the query should accept VECTOR and weight.validationFlagsQAST_CheckIsValid()can be used to validate VSIM filter clause and the SEARCH query expressionsWhich additional issues this PR fixes
Main objects this PR modified
Mark if applicable