[FLINK-3282] add FlinkRelNode interface.

Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/20235e0a
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/20235e0a
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/20235e0a

Branch: refs/heads/tableOnCalcite
Commit: 20235e0afaf5de799e71094d72ae7e47337ea82d
Parents: 4abca1d
Author: chengxiang li <chengxiang...@intel.com>
Authored: Wed Jan 27 11:37:43 2016 +0800
Committer: Fabian Hueske <fhue...@apache.org>
Committed: Fri Feb 12 11:34:09 2016 +0100

----------------------------------------------------------------------
 .../api/table/sql/calcite/DataSetRelNode.java   | 29 +++++++
 .../table/sql/calcite/node/DataSetExchange.java | 60 +++++++++++++++
 .../table/sql/calcite/node/DataSetFlatMap.java  | 56 ++++++++++++++
 .../api/table/sql/calcite/node/DataSetJoin.java | 80 ++++++++++++++++++++
 .../api/table/sql/calcite/node/DataSetMap.java  | 58 ++++++++++++++
 .../table/sql/calcite/node/DataSetReduce.java   | 58 ++++++++++++++
 .../sql/calcite/node/DataSetReduceGroup.java    | 62 +++++++++++++++
 .../api/table/sql/calcite/node/DataSetSort.java | 59 +++++++++++++++
 .../table/sql/calcite/node/DataSetSource.java   | 55 ++++++++++++++
 .../table/sql/calcite/node/DataSetUnion.java    | 51 +++++++++++++
 10 files changed, 568 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/20235e0a/flink-libraries/flink-table/src/main/java/org/apache/flink/api/table/sql/calcite/DataSetRelNode.java
----------------------------------------------------------------------
diff --git 
a/flink-libraries/flink-table/src/main/java/org/apache/flink/api/table/sql/calcite/DataSetRelNode.java
 
b/flink-libraries/flink-table/src/main/java/org/apache/flink/api/table/sql/calcite/DataSetRelNode.java
new file mode 100644
index 0000000..df0ebc0
--- /dev/null
+++ 
b/flink-libraries/flink-table/src/main/java/org/apache/flink/api/table/sql/calcite/DataSetRelNode.java
@@ -0,0 +1,29 @@
+/*
+ * 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.api.table.sql.calcite;
+
+import org.apache.calcite.rel.RelNode;
+import org.apache.flink.api.java.DataSet;
+
+public interface DataSetRelNode<T> extends RelNode {
+       
+       /**
+        * Translate the FlinkRelNode into Flink operator.
+        */
+       DataSet<T> translateToPlan();
+}

http://git-wip-us.apache.org/repos/asf/flink/blob/20235e0a/flink-libraries/flink-table/src/main/java/org/apache/flink/api/table/sql/calcite/node/DataSetExchange.java
----------------------------------------------------------------------
diff --git 
a/flink-libraries/flink-table/src/main/java/org/apache/flink/api/table/sql/calcite/node/DataSetExchange.java
 
b/flink-libraries/flink-table/src/main/java/org/apache/flink/api/table/sql/calcite/node/DataSetExchange.java
new file mode 100644
index 0000000..1ddd884
--- /dev/null
+++ 
b/flink-libraries/flink-table/src/main/java/org/apache/flink/api/table/sql/calcite/node/DataSetExchange.java
@@ -0,0 +1,60 @@
+/*
+ * 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.api.table.sql.calcite.node;
+
+import org.apache.calcite.plan.RelOptCluster;
+import org.apache.calcite.plan.RelTraitSet;
+import org.apache.calcite.rel.RelNode;
+import org.apache.calcite.rel.SingleRel;
+import 
org.apache.flink.api.common.operators.base.PartitionOperatorBase.PartitionMethod;
+import org.apache.flink.api.common.typeinfo.TypeInformation;
+import org.apache.flink.api.java.DataSet;
+import org.apache.flink.api.table.sql.calcite.DataSetRelNode;
+
+/**
+ * Flink RelNode which matches along with PartitionOperator.
+ *
+ * @param <T>
+ */
+public class DataSetExchange<T> extends SingleRel implements DataSetRelNode<T> 
{
+       
+       public DataSetExchange(RelOptCluster cluster, RelTraitSet traits, 
RelNode input) {
+               super(cluster, traits, input);
+       }
+       
+       private TypeInformation<T> getType() {
+               return null;
+       }
+       
+       private String getName() {
+               return null;
+       }
+       
+       private PartitionMethod getPartitionMethod() {
+               return null;
+       }
+       
+       private int[] getPartitionKey() {
+               return null;
+       }
+       
+       @Override
+       public DataSet<T> translateToPlan() {
+               return null;
+       }
+}

http://git-wip-us.apache.org/repos/asf/flink/blob/20235e0a/flink-libraries/flink-table/src/main/java/org/apache/flink/api/table/sql/calcite/node/DataSetFlatMap.java
----------------------------------------------------------------------
diff --git 
a/flink-libraries/flink-table/src/main/java/org/apache/flink/api/table/sql/calcite/node/DataSetFlatMap.java
 
b/flink-libraries/flink-table/src/main/java/org/apache/flink/api/table/sql/calcite/node/DataSetFlatMap.java
new file mode 100644
index 0000000..cf597b2
--- /dev/null
+++ 
b/flink-libraries/flink-table/src/main/java/org/apache/flink/api/table/sql/calcite/node/DataSetFlatMap.java
@@ -0,0 +1,56 @@
+/*
+ * 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.api.table.sql.calcite.node;
+
+import org.apache.calcite.plan.RelOptCluster;
+import org.apache.calcite.plan.RelTraitSet;
+import org.apache.calcite.rel.RelNode;
+import org.apache.calcite.rel.SingleRel;
+import org.apache.flink.api.common.functions.RichFlatMapFunction;
+import org.apache.flink.api.common.typeinfo.TypeInformation;
+import org.apache.flink.api.java.DataSet;
+import org.apache.flink.api.table.sql.calcite.DataSetRelNode;
+
+/**
+ * Flink RelNode which matches along with FlatMapOperator.
+ *
+ * @param <T>
+ */
+public class DataSetFlatMap<T> extends SingleRel implements DataSetRelNode<T> {
+       
+       protected DataSetFlatMap(RelOptCluster cluster, RelTraitSet traits, 
RelNode input) {
+               super(cluster, traits, input);
+       }
+       
+       private TypeInformation<T> getType() {
+               return null;
+       }
+       
+       private String getName() {
+               return null;
+       }
+       
+       private RichFlatMapFunction<T, T> getFlatMapFunction() {
+               return null;
+       }
+       
+       @Override
+       public DataSet<T> translateToPlan() {
+               return null;
+       }
+}

http://git-wip-us.apache.org/repos/asf/flink/blob/20235e0a/flink-libraries/flink-table/src/main/java/org/apache/flink/api/table/sql/calcite/node/DataSetJoin.java
----------------------------------------------------------------------
diff --git 
a/flink-libraries/flink-table/src/main/java/org/apache/flink/api/table/sql/calcite/node/DataSetJoin.java
 
b/flink-libraries/flink-table/src/main/java/org/apache/flink/api/table/sql/calcite/node/DataSetJoin.java
new file mode 100644
index 0000000..3d1146e
--- /dev/null
+++ 
b/flink-libraries/flink-table/src/main/java/org/apache/flink/api/table/sql/calcite/node/DataSetJoin.java
@@ -0,0 +1,80 @@
+/*
+ * 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.api.table.sql.calcite.node;
+
+import org.apache.calcite.plan.RelOptCluster;
+import org.apache.calcite.plan.RelTraitSet;
+import org.apache.calcite.rel.BiRel;
+import org.apache.calcite.rel.RelNode;
+import org.apache.flink.api.common.functions.JoinFunction;
+import org.apache.flink.api.common.operators.base.JoinOperatorBase.JoinHint;
+import org.apache.flink.api.common.typeinfo.TypeInformation;
+import org.apache.flink.api.java.DataSet;
+import org.apache.flink.api.java.operators.join.JoinType;
+import org.apache.flink.api.table.sql.calcite.DataSetRelNode;
+
+/**
+ * Flink RelNode which matches along with JoinOperator and its related 
operations.
+ */
+public class DataSetJoin<L, R, OUT> extends BiRel implements 
DataSetRelNode<OUT> {
+       
+       public DataSetJoin(RelOptCluster cluster, RelTraitSet traitSet, RelNode 
left, RelNode right) {
+               super(cluster, traitSet, left, right);
+       }
+       
+       private TypeInformation<L> getLeftInputType() {
+               return null;
+       }
+       
+       private TypeInformation<R> getRightInputType() {
+               return null;
+       }
+       
+       private TypeInformation<OUT> getType() {
+               return null;
+       }
+       
+       private String getName() {
+               return null;
+       }
+       
+       private JoinType getJoinType() {
+               return null;
+       }
+       
+       private JoinHint getJoinHint() {
+               return null;
+       }
+       
+       private int[] getLeftJoinKey() {
+               return null;
+       }
+       
+       private int[] getRightJoinKey() {
+               return null;
+       }
+       
+       private JoinFunction<L, R, OUT> getJoinFunction() {
+               return null;
+       }
+       
+       @Override
+       public DataSet<OUT> translateToPlan() {
+               return null;
+       }
+}

http://git-wip-us.apache.org/repos/asf/flink/blob/20235e0a/flink-libraries/flink-table/src/main/java/org/apache/flink/api/table/sql/calcite/node/DataSetMap.java
----------------------------------------------------------------------
diff --git 
a/flink-libraries/flink-table/src/main/java/org/apache/flink/api/table/sql/calcite/node/DataSetMap.java
 
b/flink-libraries/flink-table/src/main/java/org/apache/flink/api/table/sql/calcite/node/DataSetMap.java
new file mode 100644
index 0000000..3098cb3
--- /dev/null
+++ 
b/flink-libraries/flink-table/src/main/java/org/apache/flink/api/table/sql/calcite/node/DataSetMap.java
@@ -0,0 +1,58 @@
+/*
+ * 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.api.table.sql.calcite.node;
+
+import org.apache.calcite.plan.RelOptCluster;
+import org.apache.calcite.plan.RelTraitSet;
+import org.apache.calcite.rel.RelNode;
+import org.apache.calcite.rel.SingleRel;
+import org.apache.flink.api.common.functions.RichMapFunction;
+import org.apache.flink.api.common.typeinfo.TypeInformation;
+import org.apache.flink.api.java.DataSet;
+import org.apache.flink.api.table.sql.calcite.DataSetRelNode;
+
+/**
+ * Flink RelNode which matches along with MapOperator.
+ */
+public class DataSetMap<IN, OUT> extends SingleRel implements 
DataSetRelNode<OUT> {
+       
+       protected DataSetMap(RelOptCluster cluster, RelTraitSet traits, RelNode 
input) {
+               super(cluster, traits, input);
+       }
+       
+       private TypeInformation<IN> getInputType() {
+               return null;
+       }
+       
+       private TypeInformation<OUT> getType() {
+               return null;
+       }
+       
+       private String getName() {
+               return null;
+       }
+       
+       private RichMapFunction<IN, OUT> getMapFunction() {
+               return null;
+       }
+       
+       @Override
+       public DataSet<OUT> translateToPlan() {
+               return null;
+       }
+}

http://git-wip-us.apache.org/repos/asf/flink/blob/20235e0a/flink-libraries/flink-table/src/main/java/org/apache/flink/api/table/sql/calcite/node/DataSetReduce.java
----------------------------------------------------------------------
diff --git 
a/flink-libraries/flink-table/src/main/java/org/apache/flink/api/table/sql/calcite/node/DataSetReduce.java
 
b/flink-libraries/flink-table/src/main/java/org/apache/flink/api/table/sql/calcite/node/DataSetReduce.java
new file mode 100644
index 0000000..4aa2846
--- /dev/null
+++ 
b/flink-libraries/flink-table/src/main/java/org/apache/flink/api/table/sql/calcite/node/DataSetReduce.java
@@ -0,0 +1,58 @@
+/*
+ * 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.api.table.sql.calcite.node;
+
+import org.apache.calcite.plan.RelOptCluster;
+import org.apache.calcite.plan.RelTraitSet;
+import org.apache.calcite.rel.RelNode;
+import org.apache.calcite.rel.SingleRel;
+import org.apache.flink.api.common.functions.RichReduceFunction;
+import org.apache.flink.api.common.typeinfo.TypeInformation;
+import org.apache.flink.api.java.DataSet;
+import org.apache.flink.api.table.sql.calcite.DataSetRelNode;
+
+/**
+ * Flink RelNode which matches along with ReduceOperator.
+ */
+public class DataSetReduce<T> extends SingleRel implements DataSetRelNode<T> {
+       
+       public DataSetReduce(RelOptCluster cluster, RelTraitSet traits, RelNode 
input) {
+               super(cluster, traits, input);
+       }
+       
+       private TypeInformation<T> getType() {
+               return null;
+       }
+       
+       private String getName() {
+               return null;
+       }
+       
+       private RichReduceFunction<T> getReduceFunction() {
+               return null;
+       }
+       
+       private int[] getGroupingKeys() {
+               return null;
+       }
+       
+       @Override
+       public DataSet<T> translateToPlan() {
+               return null;
+       }
+}

http://git-wip-us.apache.org/repos/asf/flink/blob/20235e0a/flink-libraries/flink-table/src/main/java/org/apache/flink/api/table/sql/calcite/node/DataSetReduceGroup.java
----------------------------------------------------------------------
diff --git 
a/flink-libraries/flink-table/src/main/java/org/apache/flink/api/table/sql/calcite/node/DataSetReduceGroup.java
 
b/flink-libraries/flink-table/src/main/java/org/apache/flink/api/table/sql/calcite/node/DataSetReduceGroup.java
new file mode 100644
index 0000000..5467c56
--- /dev/null
+++ 
b/flink-libraries/flink-table/src/main/java/org/apache/flink/api/table/sql/calcite/node/DataSetReduceGroup.java
@@ -0,0 +1,62 @@
+/*
+ * 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.api.table.sql.calcite.node;
+
+import org.apache.calcite.plan.RelOptCluster;
+import org.apache.calcite.plan.RelTraitSet;
+import org.apache.calcite.rel.RelNode;
+import org.apache.calcite.rel.SingleRel;
+import org.apache.flink.api.common.functions.RichGroupReduceFunction;
+import org.apache.flink.api.common.typeinfo.TypeInformation;
+import org.apache.flink.api.java.DataSet;
+import org.apache.flink.api.table.sql.calcite.DataSetRelNode;
+
+/**
+ * Flink RelNode which matches along with ReduceGroupOperator.
+ */
+public class DataSetReduceGroup<IN, OUT> extends SingleRel implements 
DataSetRelNode<OUT> {
+       
+       public DataSetReduceGroup(RelOptCluster cluster, RelTraitSet traits, 
RelNode input) {
+               super(cluster, traits, input);
+       }
+       
+       private TypeInformation<IN> getInputType() {
+               return null;
+       }
+       
+       private TypeInformation<OUT> getType() {
+               return null;
+       }
+       
+       private String getName() {
+               return null;
+       }
+       
+       private RichGroupReduceFunction<IN, OUT> getGroupReduceFunction() {
+               return null;
+       }
+       
+       private int[] getGroupingKeys() {
+               return null;
+       }
+       
+       @Override
+       public DataSet<OUT> translateToPlan() {
+               return null;
+       }
+}

http://git-wip-us.apache.org/repos/asf/flink/blob/20235e0a/flink-libraries/flink-table/src/main/java/org/apache/flink/api/table/sql/calcite/node/DataSetSort.java
----------------------------------------------------------------------
diff --git 
a/flink-libraries/flink-table/src/main/java/org/apache/flink/api/table/sql/calcite/node/DataSetSort.java
 
b/flink-libraries/flink-table/src/main/java/org/apache/flink/api/table/sql/calcite/node/DataSetSort.java
new file mode 100644
index 0000000..7fa1c53
--- /dev/null
+++ 
b/flink-libraries/flink-table/src/main/java/org/apache/flink/api/table/sql/calcite/node/DataSetSort.java
@@ -0,0 +1,59 @@
+/*
+ * 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.api.table.sql.calcite.node;
+
+import org.apache.calcite.plan.RelOptCluster;
+import org.apache.calcite.plan.RelTraitSet;
+import org.apache.calcite.rel.RelNode;
+import org.apache.calcite.rel.SingleRel;
+import org.apache.flink.api.common.typeinfo.TypeInformation;
+import org.apache.flink.api.java.DataSet;
+import org.apache.flink.api.table.sql.calcite.DataSetRelNode;
+
+/**
+ * Flink RelNode which matches along with SortPartitionOperator.
+ *
+ * @param <T>
+ */
+public class DataSetSort<T> extends SingleRel implements DataSetRelNode<T> {
+       
+       public DataSetSort(RelOptCluster cluster, RelTraitSet traits, RelNode 
input) {
+               super(cluster, traits, input);
+       }
+       
+       private TypeInformation<T> getType() {
+               return null;
+       }
+       
+       private String getName() {
+               return null;
+       }
+       
+       private int[] getSortKey() {
+               return null;
+       }
+       
+       private boolean[] getSortKeyOrder() {
+               return null;
+       }
+       
+       @Override
+       public DataSet<T> translateToPlan() {
+               return null;
+       }
+}

http://git-wip-us.apache.org/repos/asf/flink/blob/20235e0a/flink-libraries/flink-table/src/main/java/org/apache/flink/api/table/sql/calcite/node/DataSetSource.java
----------------------------------------------------------------------
diff --git 
a/flink-libraries/flink-table/src/main/java/org/apache/flink/api/table/sql/calcite/node/DataSetSource.java
 
b/flink-libraries/flink-table/src/main/java/org/apache/flink/api/table/sql/calcite/node/DataSetSource.java
new file mode 100644
index 0000000..f24ee79
--- /dev/null
+++ 
b/flink-libraries/flink-table/src/main/java/org/apache/flink/api/table/sql/calcite/node/DataSetSource.java
@@ -0,0 +1,55 @@
+/*
+ * 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.api.table.sql.calcite.node;
+
+import org.apache.calcite.plan.RelOptCluster;
+import org.apache.calcite.plan.RelOptTable;
+import org.apache.calcite.plan.RelTraitSet;
+import org.apache.calcite.rel.core.TableScan;
+import org.apache.flink.api.common.typeinfo.TypeInformation;
+import org.apache.flink.api.java.DataSet;
+import org.apache.flink.api.table.sql.calcite.DataSetRelNode;
+
+/**
+ * Flink RelNode which matches along with DataSource.
+ *
+ * @param <T>
+ */
+public class DataSetSource<T> extends TableScan implements DataSetRelNode<T> {
+       
+       public DataSetSource(RelOptCluster cluster, RelTraitSet traitSet, 
RelOptTable table) {
+               super(cluster, traitSet, table);
+       }
+       
+       private TypeInformation<T> getType() {
+               return null;
+       }
+       
+       private String getName() {
+               return null;
+       }
+       
+       private DataSet<T> getDatSource() {
+               return null;
+       }
+       
+       @Override
+       public DataSet<T> translateToPlan() {
+               return null;
+       }
+}

http://git-wip-us.apache.org/repos/asf/flink/blob/20235e0a/flink-libraries/flink-table/src/main/java/org/apache/flink/api/table/sql/calcite/node/DataSetUnion.java
----------------------------------------------------------------------
diff --git 
a/flink-libraries/flink-table/src/main/java/org/apache/flink/api/table/sql/calcite/node/DataSetUnion.java
 
b/flink-libraries/flink-table/src/main/java/org/apache/flink/api/table/sql/calcite/node/DataSetUnion.java
new file mode 100644
index 0000000..8b435e9
--- /dev/null
+++ 
b/flink-libraries/flink-table/src/main/java/org/apache/flink/api/table/sql/calcite/node/DataSetUnion.java
@@ -0,0 +1,51 @@
+/*
+ * 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.api.table.sql.calcite.node;
+
+import org.apache.calcite.plan.RelOptCluster;
+import org.apache.calcite.plan.RelTraitSet;
+import org.apache.calcite.rel.BiRel;
+import org.apache.calcite.rel.RelNode;
+import org.apache.flink.api.common.typeinfo.TypeInformation;
+import org.apache.flink.api.java.DataSet;
+import org.apache.flink.api.table.sql.calcite.DataSetRelNode;
+
+/**
+ * Flink RelNode which matches along with UnionOperator.
+ *
+ * @param <T>
+ */
+public class DataSetUnion<T> extends BiRel implements DataSetRelNode<T> {
+       
+       public DataSetUnion(RelOptCluster cluster, RelTraitSet traitSet, 
RelNode left, RelNode right) {
+               super(cluster, traitSet, left, right);
+       }
+       
+       private TypeInformation<T> getType() {
+               return null;
+       }
+       
+       private String getName() {
+               return null;
+       }
+       
+       @Override
+       public DataSet<T> translateToPlan() {
+               return null;
+       }
+}

Reply via email to