You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@orc.apache.org by GitBox <gi...@apache.org> on 2021/09/28 03:54:23 UTC

[GitHub] [orc] dongjoon-hyun commented on a change in pull request #917: ORC-1008: Fix overflow detection code for C++ int64_t / java long

dongjoon-hyun commented on a change in pull request #917:
URL: https://github.com/apache/orc/pull/917#discussion_r717202883



##########
File path: java/core/src/test/org/apache/orc/TestColumnStatistics.java
##########
@@ -50,6 +51,16 @@
  */
 public class TestColumnStatistics {
 
+  @Test
+  public void testLongSumOverflow() {
+    TypeDescription schema = TypeDescription.createInt();
+    ColumnStatisticsImpl stats = ColumnStatisticsImpl.create(schema);
+    stats.updateInteger(1, 1);
+    assertTrue(((IntegerColumnStatistics) stats).isSumDefined());
+    stats.updateInteger(Long.MAX_VALUE, 3);

Review comment:
       Thank you for adding 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: dev-unsubscribe@orc.apache.org

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