[ 
https://issues.apache.org/jira/browse/FLINK-10583?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16655324#comment-16655324
 ] 

ASF GitHub Bot commented on FLINK-10583:
----------------------------------------

pnowojski commented on a change in pull request #6871: [FLINK-10583][table] Add 
base TwoInputStreamOperator with TTL operator.
URL: https://github.com/apache/flink/pull/6871#discussion_r226325589
 
 

 ##########
 File path: 
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/runtime/join/AbstractTwoInputStreamOperatorWithTTL.scala
 ##########
 @@ -80,51 +87,52 @@ abstract class AbstractTwoInputStreamOperatorWithTTL(
     timerService = new SimpleTimerService(internalTimerService)
   }
 
-  override def processElement1(element: StreamRecord[CRow]): Unit = {
-    registerProcessingCleanupTimer()
-  }
-
-  override def processElement2(element: StreamRecord[CRow]): Unit = {
-    registerProcessingCleanupTimer()
-  }
-
-  private def registerProcessingCleanupTimer(): Unit = {
+  /**
+    * If the user has specified a `minRetentionTime` and `maxRetentionTime`, 
this
+    * method registers a cleanup timer for `currentProcessingTime + 
minRetentionTime`.
+    *
+    * <p>When this timer fires, the 
[[AbstractTwoInputStreamOperatorWithTTL.cleanUpState()]]
+    * method is called.
+    */
+  protected def registerProcessingCleanUpTimer(): Unit = {
     if (stateCleaningEnabled) {
       val currentProcessingTime = timerService.currentProcessingTime()
-      val currentCleanupTime = cleanupTimeState.value()
+      val currentCleanUpTime = Option(cleanUpTimeState.value())
 
 Review comment:
   According to @twalthr we should avoid using scala classes in runtime. I 
didn't like that but changed my `Option` usages to java's `Optional`.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


> Add support for state retention to the Processing Time versioned joins.
> -----------------------------------------------------------------------
>
>                 Key: FLINK-10583
>                 URL: https://issues.apache.org/jira/browse/FLINK-10583
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Table API &amp; SQL
>    Affects Versions: 1.7.0
>            Reporter: Kostas Kloudas
>            Assignee: Kostas Kloudas
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.7.0
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to