guiyanakuang commented on a change in pull request #917:
URL: https://github.com/apache/orc/pull/917#discussion_r717197131



##########
File path: c++/src/Statistics.hh
##########
@@ -964,7 +964,23 @@ namespace orc {
       _stats.setSum(sum);
     }
 
-    void update(int64_t value, int repetitions);
+    void update(int64_t value, int repetitions) {
+      _stats.updateMinMax(value);
+
+      if (_stats.hasSum()) {
+        if (repetitions > 1) {
+          _stats.setHasSum(__builtin_mul_overflow(value, repetitions, &value) 
== 0);

Review comment:
       @wgtmac Sorry, I'm still a C++ novice. Let me see how compatible




-- 
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-unsubscr...@orc.apache.org

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


Reply via email to