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

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

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

    https://github.com/apache/flink/pull/5680#discussion_r176499309
  
    --- Diff: 
flink-libraries/flink-table/src/test/scala/org/apache/flink/table/runtime/operators/KeyedProcessFunctionWithCleanupStateTest.scala
 ---
    @@ -0,0 +1,86 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *     http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +package org.apache.flink.table.runtime.operators
    +
    +import java.lang.{Boolean => JBool}
    +import scala.collection.JavaConversions._
    +import org.apache.flink.api.common.time.Time
    +import org.apache.flink.api.common.typeinfo.TypeInformation
    +import org.apache.flink.configuration.Configuration
    +import org.apache.flink.streaming.api.functions.KeyedProcessFunction
    +import org.apache.flink.streaming.api.operators.KeyedProcessOperator
    +import org.apache.flink.streaming.runtime.streamrecord.StreamRecord
    +import org.apache.flink.table.api.StreamQueryConfig
    +import 
org.apache.flink.table.runtime.aggregate.KeyedProcessFunctionWithCleanupState
    +import org.apache.flink.table.runtime.harness.HarnessTestBase
    +import org.apache.flink.util.Collector
    +import org.junit.Test
    +import org.junit.Assert.assertArrayEquals
    +
    +class KeyedProcessFunctionWithCleanupStateTest extends HarnessTestBase {
    +  @Test
    +  def testNeedToCleanup(): Unit = {
    +    val queryConfig = new StreamQueryConfig()
    --- End diff --
    
    It would be good if the test would check that the state is actually cleared.


> Add KeyedProcessFunctionWIthCleanupState
> ----------------------------------------
>
>                 Key: FLINK-8919
>                 URL: https://issues.apache.org/jira/browse/FLINK-8919
>             Project: Flink
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 1.6.0
>            Reporter: Renjie Liu
>            Assignee: Renjie Liu
>            Priority: Minor
>             Fix For: 1.6.0
>
>
> ProcessFunctionWithCleanupState is a useful tool and I think we also need one 
> for the new KeyedProcessFunction api.



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

Reply via email to