epgif commented on code in PR #9008:
URL: https://github.com/apache/iceberg/pull/9008#discussion_r1539850016


##########
api/src/main/java/org/apache/iceberg/transforms/Days.java:
##########
@@ -55,14 +56,15 @@ public boolean satisfiesOrderOf(Transform<?, ?> other) {
     }
 
     if (other instanceof Timestamps) {
-      return Timestamps.DAY.satisfiesOrderOf(other);
+      ChronoUnit otherResultTypeUnit = ((Timestamps) 
other).getResultTypeUnit();
+      return otherResultTypeUnit == ChronoUnit.DAYS
+          || otherResultTypeUnit == ChronoUnit.MONTHS
+          || otherResultTypeUnit == ChronoUnit.YEARS;

Review Comment:
   Done, except for `Hours.java`, which I noticed wasn't delegating to 
`Timestamps.HOUR` before our change, and so I have left it not delegating to 
`Timestamps.HOUR_FROM_MICROS` now. That might be something to look into for a 
future pull request.



-- 
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: issues-unsubscr...@iceberg.apache.org

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


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

Reply via email to