[ 
https://issues.apache.org/jira/browse/FLINK-17183?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

muzimusi updated FLINK-17183:
-----------------------------
    Description: 
The 'create table [if not exists]' syntax is not supported by 
FlinkSqlParserImpl. For example, the following example will throw an error:

 
{code:java}
CREATE TABLE IF NOT EXISTS default_catalog.default_database.access_log_hive (
     source_ip VARCHAR,
     target_ip VARCHAR,
     behavior VARCHAR,
     comm VARCHAR,
     ts TIMESTAMP(3)
 ) WITH (
     'key' = 'value',
      ...
 )
{code}
The error message is like this:
{noformat}
Caused by: org.apache.flink.table.api.SqlParserException: SQL parse failed. 
Encountered "NOT" at line 1, column 17.
 Was expecting one of:
 {{ <EOF> }}
 {{ "WITH" ...}}
 {{ "COMMENT" ...}}
 {{ "PARTITIONED" ...}}
 {{ "(" ...}}
 {{ "." ...}}{noformat}
 

 

 

 

  was:
The 'create table [if not exists]' syntax is not supported by 
FlinkSqlParserImpl. For example, the following example will throw an error:

 
{code:java}
CREATE TABLE IF NOT EXISTS default_catalog.default_database.access_log_hive (
     source_ip VARCHAR,
     target_ip VARCHAR,
     behavior VARCHAR,
     comm VARCHAR,
     ts TIMESTAMP(3)
 ) WITH (
     'key' = 'value',
      ...
 )
{code}
The error message is like this:

{{Caused by: org.apache.flink.table.api.SqlParserException: SQL parse failed. 
Encountered "NOT" at line 1, column 17.}}
{{Was expecting one of:}}
{{ <EOF> }}
{{ "WITH" ...}}
{{ "COMMENT" ...}}
{{ "PARTITIONED" ...}}
{{ "(" ...}}
{{ "." ...}}

 

 

 

 


> the 'create table [if not exists]' syntax is not supported
> ----------------------------------------------------------
>
>                 Key: FLINK-17183
>                 URL: https://issues.apache.org/jira/browse/FLINK-17183
>             Project: Flink
>          Issue Type: Bug
>          Components: Connectors / Hive, Table SQL / API
>    Affects Versions: 1.10.0
>            Reporter: muzimusi
>            Priority: Major
>         Attachments: create_table_if_not_exists.png
>
>
> The 'create table [if not exists]' syntax is not supported by 
> FlinkSqlParserImpl. For example, the following example will throw an error:
>  
> {code:java}
> CREATE TABLE IF NOT EXISTS default_catalog.default_database.access_log_hive (
>      source_ip VARCHAR,
>      target_ip VARCHAR,
>      behavior VARCHAR,
>      comm VARCHAR,
>      ts TIMESTAMP(3)
>  ) WITH (
>      'key' = 'value',
>       ...
>  )
> {code}
> The error message is like this:
> {noformat}
> Caused by: org.apache.flink.table.api.SqlParserException: SQL parse failed. 
> Encountered "NOT" at line 1, column 17.
>  Was expecting one of:
>  {{ <EOF> }}
>  {{ "WITH" ...}}
>  {{ "COMMENT" ...}}
>  {{ "PARTITIONED" ...}}
>  {{ "(" ...}}
>  {{ "." ...}}{noformat}
>  
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to