JingsongLi commented on a change in pull request #41: URL: https://github.com/apache/flink-table-store/pull/41#discussion_r826894107
########## File path: flink-table-store-connector/src/main/java/org/apache/flink/table/store/connector/sink/TableStoreSink.java ########## @@ -0,0 +1,175 @@ +/* + * 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.store.connector.sink; + +import org.apache.flink.api.common.typeinfo.TypeInformation; +import org.apache.flink.streaming.api.datastream.DataStream; +import org.apache.flink.table.catalog.CatalogLock; +import org.apache.flink.table.connector.ChangelogMode; +import org.apache.flink.table.connector.RequireCatalogLock; +import org.apache.flink.table.connector.sink.DataStreamSinkProvider; +import org.apache.flink.table.connector.sink.DynamicTableSink; +import org.apache.flink.table.connector.sink.abilities.SupportsOverwrite; +import org.apache.flink.table.connector.sink.abilities.SupportsPartitioning; +import org.apache.flink.table.factories.DynamicTableFactory; +import org.apache.flink.table.store.connector.TableStore; +import org.apache.flink.table.store.log.LogOptions; +import org.apache.flink.table.store.log.LogSinkProvider; +import org.apache.flink.table.store.log.LogStoreTableFactory; +import org.apache.flink.table.types.DataType; +import org.apache.flink.table.types.logical.LogicalType; +import org.apache.flink.types.RowKind; + +import javax.annotation.Nullable; + +import java.util.HashMap; +import java.util.Map; + +/** Table sink to create {@link StoreSink}. */ +public class TableStoreSink + implements DynamicTableSink, SupportsOverwrite, SupportsPartitioning, RequireCatalogLock { + + private final TableStore tableStore; + private final boolean streaming; + private final LogOptions.LogChangelogMode logChangelogMode; + @Nullable private final DynamicTableFactory.Context logStoreContext; + @Nullable private final LogStoreTableFactory logStoreTableFactory; + + private Map<String, String> staticPartitions = new HashMap<>(); + private boolean overwrite; Review comment: overwrite = false; I know the default value is false, but it's better to write it out explicitly -- 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. To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org