[ https://issues.apache.org/jira/browse/BEAM-10329?focusedWorklogId=451718&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-451718 ]
ASF GitHub Bot logged work on BEAM-10329: ----------------------------------------- Author: ASF GitHub Bot Created on: 26/Jun/20 20:01 Start Date: 26/Jun/20 20:01 Worklog Time Spent: 10m Work Description: lukecwik commented on pull request #12096: URL: https://github.com/apache/beam/pull/12096#issuecomment-650372684 Run Java PreCommit ---------------------------------------------------------------- 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: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 451718) Time Spent: 20m (was: 10m) > Dataflow runner does not reserve timestamp of Create.Timestamped() in batch > stateful dofn > ----------------------------------------------------------------------------------------- > > Key: BEAM-10329 > URL: https://issues.apache.org/jira/browse/BEAM-10329 > Project: Beam > Issue Type: Bug > Components: runner-dataflow > Reporter: Yichi Zhang > Assignee: Yichi Zhang > Priority: P2 > Time Spent: 20m > Remaining Estimate: 0h > > When run a test pipeline such as > {code:java} > public void testTimestampedValue() throws Exception { > final String timerId = "foo"; > DoFn<KV<String, Long>, KV<Long, Instant>> statefn = > new DoFn<KV<String, Long>, KV<Long, Instant>>() { > @TimerId(timerId) > private final TimerSpec spec = > TimerSpecs.timer(TimeDomain.EVENT_TIME); > @ProcessElement > public void processElement( > @TimerId(timerId) Timer timer, > @Timestamp Instant timestamp, > OutputReceiver<KV<Long, Instant>> r) { > r.output(KV.of(3L, timestamp)); > } > @OnTimer(timerId) > public void onTimer(@Timestamp Instant timestamp, > OutputReceiver<KV<Long, Instant>> r) { > // do nothing. Since whether timer is involved doesn’t make > difference > } > }; > PCollection<KV<Long, Instant>> output = > pipeline > .apply(Create.timestamped(TimestampedValue.of(KV.of("hello", > 37L), new Instant(123L)))) > .apply(ParDo.of(statefn)); > PAssert.that(output).containsInAnyOrder(KV.of(3L, new Instant(123L))); > pipeline.run(); > } > {code} > On dataflow with fnapi, the timestamp of output in PAssert won't match. -- This message was sent by Atlassian Jira (v8.3.4#803005)