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

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

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

    https://github.com/apache/flink/pull/5688#discussion_r190176842
  
    --- Diff: 
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/runtime/aggregate/KeyedProcessFunctionWithCleanupState.scala
 ---
    @@ -44,8 +45,20 @@ abstract class KeyedProcessFunctionWithCleanupState[K, 
I, O](queryConfig: Stream
       protected def registerProcessingCleanupTimer(
         ctx: KeyedProcessFunction[K, I, O]#Context,
         currentTime: Long): Unit = {
    -    if (stateCleaningEnabled) {
    +    registerCleanupTimer(ctx, currentTime, TimeDomain.PROCESSING_TIME)
    +  }
     
    +  protected def registerEventCleanupTimer(
    --- End diff --
    
    We implemented state cleanup as processing time because it is easier to 
reason about for users and doesn't interfere that much with event-time 
processing (it is not possible to distinguish timers yet). However, it also has 
a few short comings such as cleared state when recovering a query from a 
savepoint (which we don't really encourage at the moment). 
    
    Anyway, introducing event-time state cleanup should definitely go into a 
separate issue and PR.


> Store streaming, updating tables with unique key in queryable state
> -------------------------------------------------------------------
>
>                 Key: FLINK-6968
>                 URL: https://issues.apache.org/jira/browse/FLINK-6968
>             Project: Flink
>          Issue Type: New Feature
>          Components: Table API & SQL
>            Reporter: Fabian Hueske
>            Assignee: Renjie Liu
>            Priority: Major
>
> Streaming tables with unique key are continuously updated. For example 
> queries with a non-windowed aggregation generate such tables. Commonly, such 
> updating tables are emitted via an upsert table sink to an external datastore 
> (k-v store, database) to make it accessible to applications.
> This issue is about adding a feature to store and maintain such a table as 
> queryable state in Flink. By storing the table in Flnk's queryable state, we 
> do not need an external data store to access the results of the query but can 
> query the results directly from Flink.



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

Reply via email to