wuchong commented on a change in pull request #8844: 
[FLINK-12951][table-planner] Add logic to bridge DDL to table source(…
URL: https://github.com/apache/flink/pull/8844#discussion_r300259636
 
 

 ##########
 File path: 
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/sqlexec/SqlExecutableStatementsTest.java
 ##########
 @@ -0,0 +1,108 @@
+/*
+ * 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.api.java.ExecutionEnvironment;
+import org.apache.flink.sql.parser.ddl.SqlCreateTable;
+import org.apache.flink.table.api.DataTypes;
+import org.apache.flink.table.api.internal.BatchTableEnvImpl;
+import org.apache.flink.table.api.java.BatchTableEnvironment;
+import org.apache.flink.table.calcite.FlinkPlannerImpl;
+import org.apache.flink.table.catalog.CatalogTable;
+import org.apache.flink.table.operations.Operation;
+import org.apache.flink.table.operations.ddl.CreateTableOperation;
+import org.apache.flink.table.types.DataType;
+
+import org.apache.calcite.sql.SqlNode;
+import org.junit.Ignore;
+import org.junit.Test;
+
+import java.util.Arrays;
+
+import static org.junit.Assert.assertArrayEquals;
+import static org.junit.Assert.assertEquals;
+
+/** Test cases for SqlExecutableStatement. **/
+public class SqlExecutableStatementsTest {
+       private static final ExecutionEnvironment streamExec =
+               ExecutionEnvironment.getExecutionEnvironment();
+       private static final BatchTableEnvImpl batchEnv =
+               (BatchTableEnvImpl) BatchTableEnvironment.create(streamExec);
+
+       private static final FlinkPlannerImpl planner = 
batchEnv.getFlinkPlanner();
+
+       @Test
+       public void testCreateTable() {
+               final String sql = "CREATE TABLE tbl1 (\n" +
+                       "  a bigint,\n" +
+                       "  b varchar, \n" +
+                       "  c int, \n" +
+                       "  d varchar,\n" +
+                       "  PRIMARY KEY (a, b)\n" +
 
 Review comment:
   I would suggest to throw syntax exception if we don't support primary key 
and computed column the this version. Otherwise, we may have compatibility 
problem if users use these syntax.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to