You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kvrocks.apache.org by "PragmaTwice (via GitHub)" <gi...@apache.org> on 2023/05/07 12:19:12 UTC

[GitHub] [incubator-kvrocks] PragmaTwice commented on a diff in pull request #1429: refactor: zset ranges

PragmaTwice commented on code in PR #1429:
URL: https://github.com/apache/incubator-kvrocks/pull/1429#discussion_r1186843071


##########
src/common/range_spec.h:
##########
@@ -24,36 +24,36 @@
 
 #include "status.h"
 
-struct CommonRangeLexSpec {
+struct RangeLexSpec {
   std::string min, max;
   bool minex = false, maxex = false; /* are min or max exclusive */
   bool max_infinite = false;         /* are max infinite */
   int64_t offset = -1, count = -1;
   bool removed = false, reversed = false;
-  explicit CommonRangeLexSpec() = default;
+  explicit RangeLexSpec() = default;
 };
 
-Status ParseRangeLexSpec(const std::string &min, const std::string &max, CommonRangeLexSpec *spec);
+Status ParseRangeLexSpec(const std::string &min, const std::string &max, RangeLexSpec *spec);
 
-struct CommonRangeRankSpec {
+struct RangeRankSpec {
   int start, stop;

Review Comment:
   We'd better to give default values, otherwise the value is undetermined.



##########
src/common/range_spec.h:
##########
@@ -24,36 +24,36 @@
 
 #include "status.h"
 
-struct CommonRangeLexSpec {
+struct RangeLexSpec {
   std::string min, max;
   bool minex = false, maxex = false; /* are min or max exclusive */
   bool max_infinite = false;         /* are max infinite */
   int64_t offset = -1, count = -1;
   bool removed = false, reversed = false;
-  explicit CommonRangeLexSpec() = default;
+  explicit RangeLexSpec() = default;
 };
 
-Status ParseRangeLexSpec(const std::string &min, const std::string &max, CommonRangeLexSpec *spec);
+Status ParseRangeLexSpec(const std::string &min, const std::string &max, RangeLexSpec *spec);
 
-struct CommonRangeRankSpec {
+struct RangeRankSpec {
   int start, stop;

Review Comment:
   We'd better to give default values, otherwise the value is unspecified.



-- 
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: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org