Github user fhueske commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3550#discussion_r106546899
  
    --- Diff: 
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/plan/nodes/datastream/DataStreamOverAggregate.scala
 ---
    @@ -191,3 +287,31 @@ class DataStreamOverAggregate(
     
     }
     
    +object DataStreamProcTimeCase {
    +  class ProcTimeTimestampExtractor
    +      extends AssignerWithPunctuatedWatermarks[Row] {
    +
    +    override def checkAndGetNextWatermark(
    +      lastElement: Row,
    +      extractedTimestamp: Long): Watermark = {
    +      null
    +    }
    +
    +    override def extractTimestamp(
    +      element: Row,
    +      previousElementTimestamp: Long): Long = {
    +      System.currentTimeMillis()
    --- End diff --
    
    `System.currentTimeMillis()` is not not strictly increasing. For instance 
the time of a machine can be synced by a timeserver. So we should always 
remember the last emitted timestamp and return the `max` of the last and the 
current time.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to