robertwb commented on a change in pull request #12493:
URL: https://github.com/apache/beam/pull/12493#discussion_r470940566
##########
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:
I think there'll be surprising loss of precision if this field is used
for windowing (say, with TimestampCombiner.EARLIEST) and then the timestamp is
inspected (is even available from SQL, right?) and has been truncated. (Or any
other conversion from Row to Beam and back again being lossy.)
----------------------------------------------------------------
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:
[email protected]