You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2019/04/10 16:05:33 UTC

[GitHub] [incubator-iceberg] rdblue commented on a change in pull request #152: Applies Baseline to iceberg-common and fixes applying Baseline to Iceberg-api

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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org