You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wayang.apache.org by rp...@apache.org on 2022/06/14 21:18:11 UTC
[incubator-wayang] 04/06: [TERADATA] Teradata Execution and Table Source Operator
This is an automated email from the ASF dual-hosted git repository.
rpardomeza pushed a commit to branch blossom-teradata
in repository https://gitbox.apache.org/repos/asf/incubator-wayang.git
commit 2a6c4e2e58fef464559a1327c1522a63c96ec329
Author: Rodrigo Pardo Meza <ro...@databloom.ai>
AuthorDate: Tue Jun 14 23:15:46 2022 +0200
[TERADATA] Teradata Execution and Table Source Operator
---
.../operator/TeradataExecutionOperator.java | 12 +++++++++++
.../teradata/operator/TeradataTableOperator.java | 24 ++++++++++++++++++++++
2 files changed, 36 insertions(+)
diff --git a/wayang-plugins/wayang-teradata/src/main/java/org/apache/wayang/teradata/operator/TeradataExecutionOperator.java b/wayang-plugins/wayang-teradata/src/main/java/org/apache/wayang/teradata/operator/TeradataExecutionOperator.java
new file mode 100644
index 00000000..00c863c4
--- /dev/null
+++ b/wayang-plugins/wayang-teradata/src/main/java/org/apache/wayang/teradata/operator/TeradataExecutionOperator.java
@@ -0,0 +1,12 @@
+package org.apache.wayang.teradata.operator;
+
+import org.apache.wayang.jdbc.operators.JdbcExecutionOperator;
+import org.apache.wayang.teradata.platform.TeradataPlatform;
+
+public interface TeradataExecutionOperator extends JdbcExecutionOperator {
+
+ @Override
+ default TeradataPlatform getPlatform() {
+ return TeradataPlatform.getInstance();
+ }
+}
diff --git a/wayang-plugins/wayang-teradata/src/main/java/org/apache/wayang/teradata/operator/TeradataTableOperator.java b/wayang-plugins/wayang-teradata/src/main/java/org/apache/wayang/teradata/operator/TeradataTableOperator.java
new file mode 100644
index 00000000..f4959df4
--- /dev/null
+++ b/wayang-plugins/wayang-teradata/src/main/java/org/apache/wayang/teradata/operator/TeradataTableOperator.java
@@ -0,0 +1,24 @@
+package org.apache.wayang.teradata.operator;
+
+import org.apache.wayang.core.plan.wayangplan.UnarySource;
+import org.apache.wayang.core.platform.ChannelDescriptor;
+import org.apache.wayang.core.types.DataSetType;
+import org.apache.wayang.jdbc.operators.JdbcTableSource;
+
+import java.util.List;
+
+public class TeradataTableOperator extends JdbcTableSource implements TeradataExecutionOperator {
+
+ public TeradataTableOperator(String tableName, String... columnNames) {
+ super(tableName, columnNames);
+ }
+
+ public TeradataTableOperator(JdbcTableSource that) {
+ super(that);
+ }
+
+ @Override
+ public List<ChannelDescriptor> getSupportedInputChannels(int index) {
+ throw new UnsupportedOperationException("This operator has no input channels.");
+ }
+}