[GitHub] [flink] danny0405 commented on a change in pull request #9212: [FLINK-13338][table-api] Sql conformance is hard to config in TableConfig

2019-07-31 Thread GitBox
danny0405 commented on a change in pull request #9212: [FLINK-13338][table-api] 
Sql conformance is hard to config in TableConfig
URL: https://github.com/apache/flink/pull/9212#discussion_r309177333
 
 

 ##
 File path: flink-python/pyflink/common/sql_dialect.py
 ##
 @@ -24,19 +24,21 @@ class SqlDialect(object):
 """
 Enumeration of valid SQL compatibility modes.
 
-For most of the cases, the built-in compatibility mode will suffice. For 
some features,
+In most of the cases, the built-in compatibility mode will suffice. For 
some features,
 i.e. the "create partitionable table" grammar is only supported in Hive 
dialect, you may need
 
 Review comment:
   For "create partitionable table" i actually mean create a partitionable 
table, it is not really a sql grammar, maybe i should remove the quotes.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [flink] danny0405 commented on a change in pull request #9212: [FLINK-13338][table-api] Sql conformance is hard to config in TableConfig

2019-07-26 Thread GitBox
danny0405 commented on a change in pull request #9212: [FLINK-13338][table-api] 
Sql conformance is hard to config in TableConfig
URL: https://github.com/apache/flink/pull/9212#discussion_r307948160
 
 

 ##
 File path: 
flink-table/flink-table-planner-blink/src/test/java/org/apache/flink/table/sqlexec/SqlToOperationConverterTest.java
 ##
 @@ -0,0 +1,155 @@
+/*
+ * 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.table.api.DataTypes;
+import org.apache.flink.table.api.EnvironmentSettings;
+import org.apache.flink.table.api.SqlDialect;
+import org.apache.flink.table.api.internal.TableEnvironmentImpl;
+import org.apache.flink.table.catalog.CatalogTable;
+import org.apache.flink.table.delegation.Planner;
+import org.apache.flink.table.operations.CatalogSinkModifyOperation;
+import org.apache.flink.table.operations.Operation;
+import org.apache.flink.table.operations.ddl.CreateTableOperation;
+import org.apache.flink.table.planner.operations.SqlConversionException;
+import org.apache.flink.table.types.DataType;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import static org.junit.Assert.assertArrayEquals;
+import static org.junit.Assert.assertEquals;
+
+/** Test cases for SqlExecutableStatement. **/
+public class SqlToOperationConverterTest {
+   private static final EnvironmentSettings settings = 
EnvironmentSettings.newInstance()
 
 Review comment:
   Agreed and updated, thanks.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [flink] danny0405 commented on a change in pull request #9212: [FLINK-13338][table-api] Sql conformance is hard to config in TableConfig

2019-07-25 Thread GitBox
danny0405 commented on a change in pull request #9212: [FLINK-13338][table-api] 
Sql conformance is hard to config in TableConfig
URL: https://github.com/apache/flink/pull/9212#discussion_r307188526
 
 

 ##
 File path: 
flink-table/flink-table-planner-blink/src/test/java/org/apache/flink/table/sqlexec/SqlToOperationConverterTest.java
 ##
 @@ -0,0 +1,155 @@
+/*
+ * 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.table.api.DataTypes;
+import org.apache.flink.table.api.EnvironmentSettings;
+import org.apache.flink.table.api.SqlDialect;
+import org.apache.flink.table.api.internal.TableEnvironmentImpl;
+import org.apache.flink.table.catalog.CatalogTable;
+import org.apache.flink.table.delegation.Planner;
+import org.apache.flink.table.operations.CatalogSinkModifyOperation;
+import org.apache.flink.table.operations.Operation;
+import org.apache.flink.table.operations.ddl.CreateTableOperation;
+import org.apache.flink.table.planner.operations.SqlConversionException;
+import org.apache.flink.table.types.DataType;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import static org.junit.Assert.assertArrayEquals;
+import static org.junit.Assert.assertEquals;
+
+/** Test cases for SqlExecutableStatement. **/
+public class SqlToOperationConverterTest {
+   private static final EnvironmentSettings settings = 
EnvironmentSettings.newInstance()
 
 Review comment:
   Because the `SqlToOperationConverter ` needs the `FlinkPlannerImpl` which 
usually comes from a TableEnvironment, also i want to test that the 
`TableConfig#setSqlDialect` did work well. There is no much overhead here.


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:
us...@infra.apache.org


With regards,
Apache Git Services