You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2021/01/11 13:45:37 UTC

[GitHub] [flink] leonardBang commented on a change in pull request #14280: [FLINK-20110][table-planner] Support 'merge' method for first_value a…

leonardBang commented on a change in pull request #14280:
URL: https://github.com/apache/flink/pull/14280#discussion_r555055866



##########
File path: flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/planner/functions/aggfunctions/FirstValueAggFunction.java
##########
@@ -83,7 +83,7 @@ public void accumulate(RowData rowData, Object value) {
 		GenericRowData acc = (GenericRowData) rowData;
 		if (value != null && acc.getLong(1) == Long.MAX_VALUE) {
 			acc.setField(0, value);
-			acc.setField(1, System.currentTimeMillis());
+			acc.setField(1, System.nanoTime());

Review comment:
       The `System.nanoTime()` has higher precision but it can not be used in different JVMs because every JVM because there's no guarantee that nanoTime is relative to any timebase.




----------------------------------------------------------------
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