You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pegasus.apache.org by "empiredan (via GitHub)" <gi...@apache.org> on 2024/12/10 04:43:06 UTC
[PR] feat(duplication): add a new command to shell to list duplications for one or multiple tables [incubator-pegasus]
empiredan opened a new pull request, #2165:
URL: https://github.com/apache/incubator-pegasus/pull/2165
(no comment)
--
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: dev-unsubscribe@pegasus.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pegasus.apache.org
For additional commands, e-mail: dev-help@pegasus.apache.org
Re: [PR] feat(duplication): add a new command to shell to list duplications for one or multiple tables [incubator-pegasus]
Posted by "empiredan (via GitHub)" <gi...@apache.org>.
empiredan merged PR #2165:
URL: https://github.com/apache/incubator-pegasus/pull/2165
--
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: dev-unsubscribe@pegasus.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pegasus.apache.org
For additional commands, e-mail: dev-help@pegasus.apache.org
Re: [PR] feat(duplication): add a new command to shell to list duplications for one or multiple tables [incubator-pegasus]
Posted by "acelyc111 (via GitHub)" <gi...@apache.org>.
acelyc111 commented on code in PR #2165:
URL: https://github.com/apache/incubator-pegasus/pull/2165#discussion_r1880310765
##########
src/shell/command_helper.h:
##########
@@ -1034,13 +1034,27 @@ class aggregate_stats_calcs
for (const auto &str : strs) { \
uint32_t v; \
if (!::dsn::buf2uint32(str, v)) { \
- fmt::print(stderr, "invalid command, '{}' should be an unsigned integer\n", str); \
+ SHELL_PRINTLN_ERROR("invalid command, '{}' should be an unsigned integer", str); \
return false; \
} \
container.insert(v); \
} \
} while (false)
+// Parse enum value from the parameters of command line.
+#define PARSE_OPT_ENUM(enum_val, invalid_val, ...) \
+ do { \
+ const std::string __str(cmd(__VA_ARGS__, "").str()); \
+ if (!__str.empty()) { \
+ const auto &__val = enum_from_string(__str.c_str(), invalid_val); \
+ if (__val == invalid_val) { \
+ SHELL_PRINTLN_ERROR("invalid enum {}", __str); \
Review Comment:
```suggestion
SHELL_PRINTLN_ERROR("invalid enum: '{}'", __str); \
```
--
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: dev-unsubscribe@pegasus.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pegasus.apache.org
For additional commands, e-mail: dev-help@pegasus.apache.org