You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ja...@apache.org on 2019/07/02 09:18:51 UTC
[flink] 02/03: [FLINK-12808][table-api] Introduce
OverwritableTableSink for supporting insert overwrite
This is an automated email from the ASF dual-hosted git repository.
jark pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git
commit fb111ef22b8f87dd25e61160678fc8857dffcfe0
Author: 云邪 <wu...@alibaba-inc.com>
AuthorDate: Wed Jun 12 11:01:20 2019 +0800
[FLINK-12808][table-api] Introduce OverwritableTableSink for supporting insert overwrite
---
.../flink/table/sinks/OverwritableTableSink.java | 36 ++++++++++++++++++++++
1 file changed, 36 insertions(+)
diff --git a/flink-table/flink-table-common/src/main/java/org/apache/flink/table/sinks/OverwritableTableSink.java b/flink-table/flink-table-common/src/main/java/org/apache/flink/table/sinks/OverwritableTableSink.java
new file mode 100644
index 0000000..6b46ef2
--- /dev/null
+++ b/flink-table/flink-table-common/src/main/java/org/apache/flink/table/sinks/OverwritableTableSink.java
@@ -0,0 +1,36 @@
+/*
+ * 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.sinks;
+
+import org.apache.flink.annotation.Experimental;
+
+/**
+ * A {@link TableSink} that supports INSERT OVERWRITE should implement this trait.
+ * INSERT OVERWRITE will overwrite any existing data in the table or partition.
+ *
+ * @see PartitionableTableSink for the definition of partition.
+ */
+@Experimental
+public interface OverwritableTableSink {
+
+ /**
+ * Configures whether the insert should overwrite existing data or not.
+ */
+ void setOverwrite(boolean overwrite);
+}