This is an automated email from the ASF dual-hosted git repository.

dongjoon pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/orc.git


The following commit(s) were added to refs/heads/main by this push:
     new 3d9aa415d ORC-1474: replaced deprecated `getMinimum/Maximum` in 
TestColumnStatistics
3d9aa415d is described below

commit 3d9aa415d28d5f9d21d389018441cb499983f2d8
Author: mystic-lama <[email protected]>
AuthorDate: Thu Aug 10 07:58:35 2023 -0700

    ORC-1474: replaced deprecated `getMinimum/Maximum` in TestColumnStatistics
    
    ### What changes were proposed in this pull request?
    As part of ORC-661, getMinimum/getMaximum were deprecated.
    TestColumnStatistics uses these deprecated methods.
    We need to replace them as
    getMinimum -> getMinimumLocalDate
    getMaximum -> getMaximumLocalDate
    
    ### Why are the changes needed?
    Updated deprecated methods to keep tests in sync with implementation and 
preventing failure when deprecated methods are removed from dependencies
    
    ### How was this patch tested?
    The Unit test case passes
    
    Closes #1575 from 
mystic-lama/ORC-1474_replace_deprecatedmethods_TestColumnStatistics.
    
    Authored-by: mystic-lama <[email protected]>
    Signed-off-by: Dongjoon Hyun <[email protected]>
---
 java/core/src/test/org/apache/orc/TestColumnStatistics.java | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/java/core/src/test/org/apache/orc/TestColumnStatistics.java 
b/java/core/src/test/org/apache/orc/TestColumnStatistics.java
index d66e5ee30..2ef96e5f5 100644
--- a/java/core/src/test/org/apache/orc/TestColumnStatistics.java
+++ b/java/core/src/test/org/apache/orc/TestColumnStatistics.java
@@ -408,15 +408,15 @@ public class TestColumnStatistics {
     stats2.increment(2);
     stats1.merge(stats2);
     DateColumnStatistics typed = (DateColumnStatistics) stats1;
-    assertEquals(new DateWritable(10).get(), typed.getMinimum());
-    assertEquals(new DateWritable(2000).get(), typed.getMaximum());
+    assertEquals(10, typed.getMinimumLocalDate().toEpochDay());
+    assertEquals(2000, typed.getMaximumLocalDate().toEpochDay());
     stats1.reset();
     stats1.updateDate(new DateWritable(-10));
     stats1.updateDate(new DateWritable(10000));
     stats1.increment(2);
     stats1.merge(stats2);
-    assertEquals(new DateWritable(-10).get(), typed.getMinimum());
-    assertEquals(new DateWritable(10000).get(), typed.getMaximum());
+    assertEquals(-10, typed.getMinimumLocalDate().toEpochDay());
+    assertEquals(10000, typed.getMaximumLocalDate().toEpochDay());
   }
 
   @Test

Reply via email to