infdahai commented on PR #1444: URL: https://github.com/apache/incubator-kvrocks/pull/1444#issuecomment-1587239822
> @infdahai You didn't actually split the `Inter` function into two separate :) I meant that the `Inter` function should calculate the intersection between sets and return members while `InterCard` should only calculate the cardinality and return the computed value. The command `Inter` will call `Set::Inter` and the command `InterCard` will call the `Set::InterCard` (currently the `Set::InterCard` function calls `Set::Inter` and all the complexity is still in the `Set::Inter` function). In this case, you will get rid of some of the `if` statements and simplify the code. Ok. I just thought if I split the functions, these two functions exist duplicate codes before and we add the limit `0` to `Set::Inter` to unify the two functions currently. -- 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]
