Rui Li created FLINK-14089:
------------------------------
Summary: SQL CLI doesn't support explain DMLs
Key: FLINK-14089
URL:
https://issues.apache.org/jira/browse/FLINK-14089 Project: Flink
Issue Type: Bug
Components: Table SQL / Client
Reporter: Rui Li
It seems SQL CLI only supports explaining queries. Tried to explain some INSERT statement and get
{noformat}
2019-09-16 21:04:51,755 WARN org.apache.flink.table.client.cli.CliClient - Could not execute SQL statement.
org.apache.flink.table.client.gateway.SqlExecutionException: Invalid SQL statement.
at org.apache.flink.table.client.gateway.local.LocalExecutor.explainStatement(LocalExecutor.java:310)
at org.apache.flink.table.client.cli.CliClient.callExplain(CliClient.java:459)
at org.apache.flink.table.client.cli.CliClient.callCommand(CliClient.java:289)
at java.util.Optional.ifPresent(Optional.java:159)
at org.apache.flink.table.client.cli.CliClient.open(CliClient.java:201)
at org.apache.flink.table.client.SqlClient.openCli(SqlClient.java:123)
at org.apache.flink.table.client.SqlClient.start(SqlClient.java:105)
at org.apache.flink.table.client.SqlClient.main(SqlClient.java:194)
Caused by: org.apache.flink.table.client.gateway.SqlExecutionException: Invalid SQL statement.
at org.apache.flink.table.client.gateway.local.LocalExecutor.createTable(LocalExecutor.java:537)
at org.apache.flink.table.client.gateway.local.LocalExecutor.explainStatement(LocalExecutor.java:306)
... 7 more
Caused by: org.apache.flink.table.api.ValidationException: Unsupported SQL query! sqlQuery() only accepts a single SQL query of type SELECT, UNION, INTERSECT, EXCEPT, VALUES, and ORDER_BY.
at org.apache.flink.table.api.internal.TableEnvironmentImpl.sqlQuery(TableEnvironmentImpl.java:301)
at org.apache.flink.table.client.gateway.local.LocalExecutor.lambda$createTable$12(LocalExecutor.java:534)
at org.apache.flink.table.client.gateway.local.ExecutionContext.wrapClassLoader(ExecutionContext.java:216)
at org.apache.flink.table.client.gateway.local.LocalExecutor.createTable(LocalExecutor.java:534)
... 8 more
{noformat}
--
This message was sent by Atlassian Jira
(v8.3.2#803003)