-
Notifications
You must be signed in to change notification settings - Fork 513
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
MOD-4152: Return JSON from multi value #3060
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.
few comments
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.
👍
@K-Jo please approve this API changes. |
Codecov ReportBase: 83.01% // Head: 82.49% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #3060 +/- ##
==========================================
- Coverage 83.01% 82.49% -0.52%
==========================================
Files 181 181
Lines 30031 30105 +74
==========================================
- Hits 24929 24834 -95
- Misses 5102 5271 +169
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
tests/pytests/test_followhashes.py
Outdated
@@ -79,6 +79,7 @@ def testPrefix2(env): | |||
env.assertIn('that:foo', res) | |||
env.assertIn('this:foo', res) | |||
|
|||
@no_asan |
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.
Unbound name: Name no_asan
is used but not defined in the current scope.
ℹ️ Learn about @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Command | Usage |
---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]
Co-authored-by: Ariel Shtul <ariel.shtul@redislabs.com>
…without LOAD/SORTABLE
…_multi_projection
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.
Some more comments
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.
LGTM
Enable to
RETURN
multi values,Such as multi value attributes obtained from a JSONPath with wildcards, etc., for example,
$..field[*]
.The entire JSON string representation of the values should be returned (and not only the first value)
MOD-4152
MOD-4142
MOD-4267
Requires
getJSONFromIter
RedisJSON/RedisJSON#816 - to get JSON serialization of one or more values, as an array.resetIter
RedisJSON/RedisJSON#838 - to be able to reset an iterator back to the beginning, so it could be reused efficiently even if it was already incremented.More details
For consistency and to decouple the query from the returned value, we always return a top-level array:
5
, will return'[5]'
, and an array["a", "b"]
will return[["a", "b"]]
$.arr[*]
, an array["a", "b"]
will return["a", "b"]
Client/user code would need to parse the returned JSON (also needed before this PR as long as we return bulk string)
and now, with this PR, to iterate the returned array (even when it has only a single value)
Backward compatibility
FT.SEARCH
orFT.AGGREGATE
commandDIALECT
parameter inFT.SEARCH
andFT.AGGREGATE
command, and theDEFAULT_DIALECT
configuration parameter, we utilize themDEFAULT_DIALECT 3
, or explicitly useDIALECT 3
inFT.SEARCH
orFT.AGGREGATE
command