[ 
https://issues.apache.org/jira/browse/FLINK-29486?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17616281#comment-17616281
 ] 

Shengkai Fang commented on FLINK-29486:
---------------------------------------

The Client parser relies on the TokenManager that used by the CalciteParser, 
which is able to convert the input statement to the token stream. The reason 
why we don't use `Parser` here is because parser will validate the sql when 
converting to the Operation, which needs to read the Catalog. However, the 
client doesn't have the session state in the remote mode.

 

The Client Parser does two things in the future:
 # It's able to remove the comment and submit the statment when semicolon is at 
the end of the statement.
 # It get the statement type for later processing with the Token type. The type 
of statement is necessary at the client side because the client goes to the 
different processing logic for different statement. For example, the client 
should print the raw content rather than the whole table to the terminal for 
the SHOW CREATE TABLE statement.

 

> Introduce Client Parser to get statement type
> ---------------------------------------------
>
>                 Key: FLINK-29486
>                 URL: https://issues.apache.org/jira/browse/FLINK-29486
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Table SQL / Client
>    Affects Versions: 1.17.0
>            Reporter: yuzelin
>            Assignee: yuzelin
>            Priority: Major
>              Labels: pull-request-available
>
> In 
> [FLIP-24|https://cwiki.apache.org/confluence/display/FLINK/FLIP-24%3A+SQL+Client]
>  and  
> [FLIP-91|https://cwiki.apache.org/confluence/display/FLINK/FLIP-91%3A+Support+SQL+Gateway#FLIP91:SupportSQLGateway],
>  the SQL client was designed to has two mode: embedded and remote. Currently 
> only embedded mode has been implemented, so we need to implement the remote 
> mode.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to