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

godfrey he updated FLINK-17728:
-------------------------------
    Description: 
Current, all statements in sql client are parsed via regex matching, which has 
many limitations, such as it can't handle comments. To avoid that limitations, 
we should try best to use sql parser to parse a statement. There are many 
statement can't be handle by sql parser, such as: set, reset. so they are still 
handle through regex matching.

statements handled through regex matching:
quit, exit, clear, help, desc, explain, set, reset source, show modules

statements handled through sql parser:
show catalogs, show databases, show tables, show functions, use catalog, use, 
describe, explain plan for, select, insert, DDLs

note: we keep `explain xx`, and also support `explain plan for xx`

  was:
Current, all statements in sql client are parsed via regex matching, which has 
many limitations, such as it can't handle comments. to avoid that problem, we 
should try best to use sql parser to parse a statement.
however, there are many statement can't be handle by sql parser, such as: set, 
reset. They are still handle through regex matching.

statements handled through regex matching:
quit, exit, clear, help, desc, explain, set, reset source, show modules

statements handled through sql parser:
show catalogs, show databases, show tables, show functions, use catalog, use, 
describe, explain plan for, select, insert, DDLs


> sql client supports parser statements via sql parser
> ----------------------------------------------------
>
>                 Key: FLINK-17728
>                 URL: https://issues.apache.org/jira/browse/FLINK-17728
>             Project: Flink
>          Issue Type: Improvement
>          Components: Table SQL / Client
>            Reporter: godfrey he
>            Priority: Major
>             Fix For: 1.11.0
>
>
> Current, all statements in sql client are parsed via regex matching, which 
> has many limitations, such as it can't handle comments. To avoid that 
> limitations, we should try best to use sql parser to parse a statement. There 
> are many statement can't be handle by sql parser, such as: set, reset. so 
> they are still handle through regex matching.
> statements handled through regex matching:
> quit, exit, clear, help, desc, explain, set, reset source, show modules
> statements handled through sql parser:
> show catalogs, show databases, show tables, show functions, use catalog, use, 
> describe, explain plan for, select, insert, DDLs
> note: we keep `explain xx`, and also support `explain plan for xx`



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

Reply via email to