infdahai commented on code in PR #1444:
URL: 
https://github.com/apache/incubator-kvrocks/pull/1444#discussion_r1218293285


##########
src/types/redis_set.cc:
##########
@@ -332,29 +332,66 @@ rocksdb::Status Set::Union(const std::vector<Slice> 
&keys, std::vector<std::stri
  * key3 = {a,c,e}
  * INTER key1 key2 key3 = {c}
  */
-rocksdb::Status Set::Inter(const std::vector<Slice> &keys, 
std::vector<std::string> *members) {
+rocksdb::Status Set::Inter(const std::vector<Slice> &keys, 
std::vector<std::string> *members, uint64_t *cnt) {
   members->clear();
 
   std::map<std::string, size_t> member_counters;
   std::vector<std::string> target_members;
   auto s = Members(keys[0], &target_members);
   if (!s.ok() || target_members.empty()) return s;
+
+  uint64_t limit = cnt ? *cnt : 0;
+  bool has_limit = limit != 0;
+  bool limited = false;

Review Comment:
   Yeah, I should split the func.



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