YannByron commented on code in PR #2277:
URL: https://github.com/apache/fluss/pull/2277#discussion_r2659740515
##########
fluss-common/src/main/java/org/apache/fluss/row/TimestampNtz.java:
##########
@@ -70,6 +71,18 @@ public int getNanoOfMillisecond() {
return nanoOfMillisecond;
}
+ /**
+ * Creates an instance of {@link TimestampNtz} from microseconds.
+ *
+ * <p>The nanos-of-millisecond field will be set to zero.
+ *
+ * @param microseconds the number of microseconds since {@code 1970-01-01
00:00:00}; a negative
+ * number is the number of microseconds before {@code 1970-01-01
00:00:00}
+ */
+ public static TimestampNtz fromMicros(long microseconds) {
+ return new TimestampNtz(Math.floorDiv(microseconds,
MICROS_PER_MILLIS), 0);
Review Comment:
You're right. I will modify this.
--
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]