wuchong commented on a change in pull request #11482: [FLINK-16581][table] Minibatch deduplication lack state TTL bug fix URL: https://github.com/apache/flink/pull/11482#discussion_r399899324
########## File path: flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/operators/bundle/MapBundleFunctionWithStateRetention.java ########## @@ -0,0 +1,62 @@ +/* + * 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.bundle; + +import org.apache.flink.api.common.state.StateTtlConfig; +import org.apache.flink.api.common.state.StateTtlConfig.StateVisibility; +import org.apache.flink.api.common.time.Time; +import org.apache.flink.table.runtime.functions.CleanupState; + +import static org.apache.flink.util.Preconditions.checkArgument; + +/** + * Basic interface for map bundle processing and could cleanup state. + * + * @param <K> The type of the key in the bundle map + * @param <V> The type of the value in the bundle map + * @param <IN> Type of the input elements. + * @param <OUT> Type of the returned elements. + */ + +public abstract class MapBundleFunctionWithStateRetention<K, V, IN, OUT> extends MapBundleFunction<K, V, IN, OUT> implements CleanupState { Review comment: I don't think we need an abstraction for such a simple member field. A utility to create StateTtlConfig is enough. ---------------------------------------------------------------- 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: [email protected] With regards, Apache Git Services
