pvary commented on a change in pull request #2254:
URL: https://github.com/apache/iceberg/pull/2254#discussion_r582352610



##########
File path: 
mr/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergFilterFactory.java
##########
@@ -173,11 +172,11 @@ private static BigDecimal 
hiveDecimalToBigDecimal(HiveDecimalWritable hiveDecima
   }
 
   private static int daysFromDate(Date date) {
-    return DateTimeUtil.daysFromInstant(Instant.ofEpochMilli(date.getTime()));
+    return DateTimeUtil.daysFromDate(date.toLocalDate());

Review comment:
       Added extra comments to the methods, and in them I tried to describe how 
Hive parses literals.
   Hope the comments are help to clarify the changes. If not, feel free to ask. 
It would be good to have good enough comments in the code, so any newcomer 
could understand the hows and the whys.
   
   Thanks,
   Peter




----------------------------------------------------------------
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]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to