This is an automated email from the ASF dual-hosted git repository.

tyrantlucifer pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-seatunnel.git


The following commit(s) were added to refs/heads/dev by this push:
     new 68dc142e8 [Feature][Core][Factory] Add Transform Factory (#3485)
68dc142e8 is described below

commit 68dc142e89d8aa34042a7c54484e12907effe3b2
Author: Eric <[email protected]>
AuthorDate: Mon Nov 21 22:47:00 2022 +0800

    [Feature][Core][Factory] Add Transform Factory (#3485)
---
 .../api/table/connector/TableTransform.java        | 25 +++++++++++++++
 .../api/table/factory/TableTransformFactory.java   | 37 ++++++++++++++++++++++
 2 files changed, 62 insertions(+)

diff --git 
a/seatunnel-api/src/main/java/org/apache/seatunnel/api/table/connector/TableTransform.java
 
b/seatunnel-api/src/main/java/org/apache/seatunnel/api/table/connector/TableTransform.java
new file mode 100644
index 000000000..6c11a0086
--- /dev/null
+++ 
b/seatunnel-api/src/main/java/org/apache/seatunnel/api/table/connector/TableTransform.java
@@ -0,0 +1,25 @@
+/*
+ * 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.seatunnel.api.table.connector;
+
+import org.apache.seatunnel.api.transform.SeaTunnelTransform;
+
+public interface TableTransform<T> {
+
+    SeaTunnelTransform<T> createTransform();
+}
diff --git 
a/seatunnel-api/src/main/java/org/apache/seatunnel/api/table/factory/TableTransformFactory.java
 
b/seatunnel-api/src/main/java/org/apache/seatunnel/api/table/factory/TableTransformFactory.java
new file mode 100644
index 000000000..afc638ab9
--- /dev/null
+++ 
b/seatunnel-api/src/main/java/org/apache/seatunnel/api/table/factory/TableTransformFactory.java
@@ -0,0 +1,37 @@
+/*
+ * 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.seatunnel.api.table.factory;
+
+import org.apache.seatunnel.api.table.connector.TableTransform;
+
+/**
+ * This is an SPI interface, used to create {@link 
org.apache.seatunnel.api.table.connector.TableTransform}. Each plugin need to 
have it own implementation.
+ * todo: now we have not use this interface, we directly use {@link 
org.apache.seatunnel.api.transform.SeaTunnelTransform} as the SPI interface
+ */
+public interface TableTransformFactory extends Factory {
+
+    /**
+     * We will never use this method now. So gave a default implement and 
return null.
+     *
+     * @param context TableFactoryContext
+     * @return
+     */
+    default <T> TableTransform<T> createTransform(TableFactoryContext context) 
{
+        throw new UnsupportedOperationException("unsupported now");
+    }
+}

Reply via email to