rdblue commented on a change in pull request #152: Applies Baseline to 
iceberg-common and fixes applying Baseline to Iceberg-api
URL: https://github.com/apache/incubator-iceberg/pull/152#discussion_r274040767
 
 

 ##########
 File path: api/src/main/java/org/apache/iceberg/transforms/Timestamps.java
 ##########
 @@ -53,7 +53,8 @@ public Integer apply(Long timestampMicros) {
     OffsetDateTime timestamp = Instant
         .ofEpochSecond(timestampMicros / 1_000_000)
         .atOffset(ZoneOffset.UTC);
-    return (int) granularity.between(EPOCH, timestamp);
+    Integer year = Long.valueOf(granularity.between(EPOCH, 
timestamp)).intValue();
 
 Review comment:
   This isn't necessarily a year. It may be months, days, or hours. Can we 
return `intValue()` directly instead?

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


With regards,
Apache Git Services

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

Reply via email to