snuyanzin commented on code in PR #25897:
URL: https://github.com/apache/flink/pull/25897#discussion_r1939127803


##########
flink-table/flink-table-common/src/main/java/org/apache/flink/table/utils/DateTimeUtils.java:
##########
@@ -1299,6 +1380,39 @@ private static long ceil(long a, long b) {
         }
     }
 
+    private static long ceil(long a, int b) {
+        float q = (float) b / NANOS_PER_MILLISECOND;

Review Comment:
   Why do we need it?
   Am I right that we want to check just the sign of the result?
   At the same time `NANOS_PER_MILLISECOND` is a constant and that means that 
the sign of the result is the same as the sign of b
   so it could be replaces with just something like 
   ```java
           return b > 0 ? a + 1L : a;
   ```



-- 
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...@flink.apache.org

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

Reply via email to