SharonIV0x86 commented on code in PR #2849:
URL: https://github.com/apache/kvrocks/pull/2849#discussion_r2079722739
##########
src/commands/cmd_tdigest.cc:
##########
@@ -265,13 +265,16 @@ class CommandTDigestQuantile : public Commander {
}
return {Status::RedisExecErr, s.ToString()};
}
- if (values_.empty()) {
- return {Status::RedisExecErr, "invalid quantile or empty tdigest"};
- }
std::vector<std::string> quantile_strings;
quantile_strings.reserve(result.quantiles.size());
- for (const auto &q : result.quantiles) {
- quantile_strings.push_back(std::to_string(q));
+ if (!result.has_centroids) {
+ for (size_t i = 0; i < values_.size(); ++i) {
+ quantile_strings.emplace_back("nan");
Review Comment:
Good idea, will do this.
--
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]