git-hulk commented on code in PR #2119:
URL: https://github.com/apache/kvrocks/pull/2119#discussion_r1506100073


##########
src/storage/scripting.cc:
##########
@@ -1009,12 +1015,30 @@ const char *RedisProtocolToLuaTypeAggregate(lua_State 
*lua, const char *reply, i
     lua_pushboolean(lua, 0);
     return p;
   }
+  if (atype == '*') {
+    lua_newtable(lua);
+    for (j = 0; j < mbulklen; j++) {
+      lua_pushnumber(lua, j + 1);
+      p = RedisProtocolToLuaType(lua, p);
+      lua_settable(lua, -3);
+    }
+    return p;
+  }
+
+  // atype == '%' or atype == '~'

Review Comment:
   Yes, that makes a lot of sense. How about doing a check before pushing into 
lua stack like:
   
   ```
   CHECK(atype == '%' || atype == '~')
   if (atype == '%' || atype == '~') {
      // do something
   }
   
   ```



-- 
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]

Reply via email to