pvary commented on code in PR #19222:
URL: https://github.com/apache/iceberg/pull/19222#discussion_r4801619432
##########
api/src/main/java/org/apache/iceberg/util/DateTimeUtil.java:
##########
@@ -105,6 +105,25 @@ public static long nanosToMicros(long nanos) {
return Math.floorDiv(nanos, NANOS_PER_MICRO);
}
+ /**
+ * Converts epoch milliseconds and a normalized nanosecond-of-millisecond
component to epoch
+ * nanoseconds.
+ *
+ * @param millis milliseconds since the epoch
+ * @param nanosOfMillisecond nanoseconds within the millisecond, from 0 to
999999
+ * @return nanoseconds since the epoch
+ * @throws ArithmeticException if the result cannot be represented as a long
+ */
+ public static long nanosFromMillis(long millis, int nanosOfMillisecond) {
Review Comment:
I don't like this in the `api` module.
What about a Flink specific `nanosFromTimestampData(TimestampData)`? Maybe
in `RowDataUtil`?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]