You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2019/06/06 02:27:47 UTC

[GitHub] [flink] KurtYoung commented on a change in pull request #8585: [FLINK-12690][table-api] Introduce a Planner interface

KurtYoung commented on a change in pull request #8585:  [FLINK-12690][table-api] Introduce a Planner interface 
URL: https://github.com/apache/flink/pull/8585#discussion_r290999294
 
 

 ##########
 File path: flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/operations/ModifyOperation.java
 ##########
 @@ -0,0 +1,52 @@
+/*
+ * 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.operations;
+
+import org.apache.flink.annotation.Internal;
+import org.apache.flink.table.api.QueryConfig;
+import org.apache.flink.table.api.TableSchema;
+
+import java.util.List;
+
+/**
+ * A {@link TableOperation} that describes the DML queries such as e.g. INSERT or conversion to a
+ * DataStream.
+ *
+ * <p>A tree of {@link QueryOperation} with a {@link ModifyOperation} on top
+ * represents a runnable query that can be transformed into a graph of
+ * {@link org.apache.flink.streaming.api.transformations.StreamTransformation}
+ * via {@link org.apache.flink.table.planner.Planner#translate(List, QueryConfig)}
+ *
+ * <p>It extends from {@link QueryOperation} to enable applying subsequent
+ * {@link QueryOperation}s on top. In other words it makes it possible to have an output
+ * transformation as a middle step of a relational query. This is not supported yet.
+ *
+ * @see QueryOperation
+ */
+@Internal
+public abstract class ModifyOperation extends QueryOperation {
 
 Review comment:
   I think we should not let this class extends from `QueryOperation`, it makes the class hierarchy hard to understand. There are plenty of ways to achieve goal of applying subsequent `QueryOperation` on it. 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services