PragmaTwice commented on code in PR #1859:
URL: https://github.com/apache/kvrocks/pull/1859#discussion_r1375370486
##########
src/types/json.h:
##########
@@ -215,6 +215,30 @@ struct JsonValue {
return Status::OK();
}
+ StatusOr<size_t> Del(const std::string &path) {
+ const std::string parent_path = path + "^";
+ const std::string child_path = path.substr(path.find_last_of('.') + 1);
Review Comment:
It is not a general way to retrieve the key, e.g. it can be wrong while
processing `$[1]`, `$["a"]`, `$.a[*]`.
TBH it is hard to retrieve the key here, but you can try to cover more cases.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]