dawidwys commented on a change in pull request #11646: [FLINK-16988][table] Add core table source/sink interfaces URL: https://github.com/apache/flink/pull/11646#discussion_r404622090
########## File path: flink-table/flink-table-common/src/main/java/org/apache/flink/table/connector/sink/DynamicTableSink.java ########## @@ -0,0 +1,167 @@ +/* + * 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.connector.sink; + +import org.apache.flink.annotation.PublicEvolving; +import org.apache.flink.table.connector.ChangelogMode; +import org.apache.flink.table.connector.RuntimeConverter; +import org.apache.flink.table.data.RowData; +import org.apache.flink.table.types.DataType; +import org.apache.flink.table.types.logical.LogicalType; +import org.apache.flink.types.Row; +import org.apache.flink.types.RowKind; + +import javax.annotation.Nullable; + +import java.io.Serializable; + +/** + * Sink of a dynamic table to an external storage system. + * + * <p>Dynamic tables are the core concept of Flink's Table & SQL API for processing both bounded and + * unbounded data in a unified fashion. By definition, a dynamic table can change over time. + * + * <p>When writing a dynamic table, the content can either be considered as a changelog (finite or + * infinite) for which all changes are written out continuously until the changelog is exhausted. The + * given {@link ChangelogMode} indicates the set of changes that the sink accepts during runtime. + * + * <p>For regular batch scenarios, the sink can solely accept insert-only rows and write out bounded + * streams. + * + * <p>For regular streaming scenarios, the sink can solely accept insert-only rows and can write out + * unbounded streams. + * + * <p>For change data capture (CDC) scenarios, the sink can write out bounded or unbounded streams with + * insert, update, and delete rows. See also {@link RowKind}. + * + * <p>Instances of {@link DynamicTableSink} can be seen as factories that eventually produce concrete + * runtime implementation for writing the actual data. + * + * <p>Depending on the optionally declared abilities, the planner might apply changes to an instance + * and thus mutates the produced runtime implementation. Review comment: nit: `mutates` -> `mutate` ---------------------------------------------------------------- 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
