flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [flink] danny0405 commented on a change in pull request #8548: [FLINK-6962] [table] Add a create table SQL DDL
Date Wed, 29 May 2019 08:36:26 GMT
danny0405 commented on a change in pull request #8548: [FLINK-6962] [table] Add a create table
URL: https://github.com/apache/flink/pull/8548#discussion_r288452342

 File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/sqlexec/SqlExecutableStatement.java
 @@ -0,0 +1,79 @@
+ * 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.sqlexec;
+import org.apache.flink.sql.parser.ddl.SqlCreateTable;
+import org.apache.flink.table.api.TableEnvironment;
+import org.apache.flink.table.api.TableException;
+import org.apache.calcite.sql.SqlNode;
+import org.apache.calcite.util.ReflectUtil;
+import org.apache.calcite.util.ReflectiveVisitor;
+ * Mix-in tool class for {@code SqlNode} that allows DDL commands to be
+ * executed directly.
+ *
+ * <p>For every kind of {@link SqlNode}, there needs to have a corresponding
+ * method #execute(type) method, the 'type' argument should be the subclass
+ * type for the supported {@link SqlNode}.
+ */
+public class SqlExecutableStatement implements ReflectiveVisitor {
 Review comment:
   If we want to separate the `SqlNode` and `TableEnvironment` interaction logic, the implementation
must relay on the specific implementation abstractions(say TableEnvironment, CatalogTable
..), personally i don't want to mix-in these abstractions to the parser module (make it clean
and with better reusability).

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:

With regards,
Apache Git Services

View raw message