Jark Wu created FLINK-13504:
-------------------------------
Summary: NoSuchFieldError when executing DDL via tEnv.sqlUpdate in application project
Key: FLINK-13504
URL:
https://issues.apache.org/jira/browse/FLINK-13504 Project: Flink
Issue Type: Bug
Components: Table SQL / Legacy Planner, Table SQL / Planner
Reporter: Jark Wu
Fix For: 1.9.0, 1.10.0
When we create a quickstart project to try flink 1.9/1.10, a NoSuchFieldError is thrown.
The dependencies (the flink 1.0 is installed locally for commit 70fe6aa747ad021bbb8dd8cdc0beecc863f010be, flink 1.9 has the same problem):
{code:xml}
<dependencies>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-table-api-java</artifactId>
<version>1.10-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-table-planner_2.11</artifactId>
<version>1.10-SNAPSHOT</version>
</dependency>
</dependencies>
{code}
The program code:
{code:java}
package com.github.wuchong;
import org.apache.flink.table.api.EnvironmentSettings;
import org.apache.flink.table.api.TableEnvironment;
public class DDLTest {
public static void main(String[] args) {
EnvironmentSettings settings = EnvironmentSettings.newInstance().useOldPlanner().inStreamingMode().build();
TableEnvironment tEnv = TableEnvironment.create(settings);
tEnv.sqlUpdate("CREATE TABLE MyTable (\n" +
" a int, \n" +
" b bigint, \n" +
" c varchar \n" +
")\n comment 'table comment'\n" +
"partitioned by (b)\n" +
"with (\n" +
" connector = 'csv', \n" +
" csv.path = '/tmp/path'\n" +
")");
}
}
{code}
The exception:
{code}
Exception in thread "main" java.lang.NoSuchFieldError: names
at org.apache.flink.sql.parser.ddl.SqlCreateTable.fullTableName(SqlCreateTable.java:326)
at org.apache.flink.table.sqlexec.SqlToOperationConverter.convertCreateTable(SqlToOperationConverter.java:140)
at org.apache.flink.table.sqlexec.SqlToOperationConverter.convert(SqlToOperationConverter.java:86)
at org.apache.flink.table.planner.StreamPlanner.parse(StreamPlanner.scala:115)
at org.apache.flink.table.api.internal.TableEnvironmentImpl.sqlUpdate(TableEnvironmentImpl.java:335)
at com.github.wuchong.DDLTest.main(DDLTest.java:29)
{code}
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)