cyb70289 commented on a change in pull request #9435:
URL: https://github.com/apache/arrow/pull/9435#discussion_r580761348
##########
File path: cpp/src/arrow/util/tdigest.h
##########
@@ -60,12 +61,27 @@ class ARROW_EXPORT TDigest {
input_.push_back(value);
}
+ // skip NAN on adding
+ // TODO(yibo): store NAN as is, partition to buffer end before merging
+ template <typename T>
+ typename std::enable_if<std::is_floating_point<T>::value>::type NanAdd(T
value) {
+ if (!std::isnan(value)) Add(value);
+ }
+
+ template <typename T>
+ typename std::enable_if<std::is_integral<T>::value>::type NanAdd(T value) {
+ Add(static_cast<double>(value));
Review comment:
But looks MSVC doesn't support it? https://godbolt.org/z/h6jxGo
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]