This is an automated email from the ASF dual-hosted git repository.

twice pushed a commit to branch unstable
in repository https://gitbox.apache.org/repos/asf/kvrocks.git


The following commit(s) were added to refs/heads/unstable by this push:
     new 43bf8ef7 Add type name of JSON in redis_metadata.h (#1848)
43bf8ef7 is described below

commit 43bf8ef7c323dc9d90097e25e16e85e6a8ce3379
Author: Twice <[email protected]>
AuthorDate: Sun Oct 22 00:38:51 2023 +0900

    Add type name of JSON in redis_metadata.h (#1848)
    
    Co-authored-by: hulk <[email protected]>
---
 src/storage/redis_metadata.h             | 4 ++--
 tests/gocase/unit/type/json/json_test.go | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/storage/redis_metadata.h b/src/storage/redis_metadata.h
index 8d6aac65..423d8388 100644
--- a/src/storage/redis_metadata.h
+++ b/src/storage/redis_metadata.h
@@ -64,8 +64,8 @@ enum RedisCommand {
   kRedisCmdLMove,
 };
 
-const std::vector<std::string> RedisTypeNames = {"none", "string", "hash",     
 "list",   "set",
-                                                 "zset", "bitmap", 
"sortedint", "stream", "MBbloom--"};
+const std::vector<std::string> RedisTypeNames = {"none",   "string",    
"hash",   "list",      "set",      "zset",
+                                                 "bitmap", "sortedint", 
"stream", "MBbloom--", "ReJSON-RL"};
 
 constexpr const char *kErrMsgWrongType = "WRONGTYPE Operation against a key 
holding the wrong kind of value";
 constexpr const char *kErrMsgKeyExpired = "the key was expired";
diff --git a/tests/gocase/unit/type/json/json_test.go 
b/tests/gocase/unit/type/json/json_test.go
index 452dd250..b86e343f 100644
--- a/tests/gocase/unit/type/json/json_test.go
+++ b/tests/gocase/unit/type/json/json_test.go
@@ -58,6 +58,7 @@ func TestJson(t *testing.T) {
                require.Equal(t, rdb.Do(ctx, "JSON.GET", "a", "$..x", 
"$..y").Val(), `{"$..x":[1,{"y":2}],"$..y":[{"x":{"y":2},"y":3},3,2]}`)
 
                require.Equal(t, rdb.Do(ctx, "JSON.GET", "no-such-key").Val(), 
nil)
+               require.Equal(t, rdb.Type(ctx, "a").Val(), "ReJSON-RL")
        })
 
        t.Run("JSON.GET with options", func(t *testing.T) {

Reply via email to