You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2020/08/15 03:08:57 UTC

[GitHub] [beam] ZijieSong946 commented on a change in pull request #12493: [BEAM-10607] [WIP] Support micro-second ZetaSQL TIMESTAMP in BeamSQL

ZijieSong946 commented on a change in pull request #12493:
URL: https://github.com/apache/beam/pull/12493#discussion_r470929991



##########
File path: sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/rel/BeamTableFunctionScanRel.java
##########
@@ -232,7 +233,11 @@ private Schema getKeySchema(Schema inputSchema, List<Integer> keys) {
           upstream
               .apply(
                   "assignEventTimestamp",
-                  WithTimestamps.<Row>of(row -> row.getDateTime(windowFieldIndex).toInstant())
+                  WithTimestamps.<Row>of(
+                          row ->
+                              Instant.ofEpochMilli(

Review comment:
       Yeah. We do not support timestamp microsecond precision for windowing in this PR. Windowing for Streaming tests is still millisecond precision. So this conversion is fine, because `Instant.toEpochMilli()` is not lossy for an millisecond precision `Instant`.




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