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

ASF GitHub Bot commented on FLINK-8858:
---------------------------------------

Github user pnowojski commented on a diff in the pull request:

    https://github.com/apache/flink/pull/6332#discussion_r202407072
  
    --- Diff: 
flink-libraries/flink-sql-client/src/main/java/org/apache/flink/table/client/SqlClient.java
 ---
    @@ -97,14 +97,34 @@ private void start() {
                        // add shutdown hook
                        Runtime.getRuntime().addShutdownHook(new 
EmbeddedShutdownThread(context, executor));
     
    -                   // start CLI
    -                   final CliClient cli = new CliClient(context, executor);
    -                   cli.open();
    +                   // do the actual work
    +                   openCli(context, executor);
                } else {
                        throw new SqlClientException("Gateway mode is not 
supported yet.");
                }
        }
     
    +   /**
    +    * Opens the CLI client for executing SQL statements.
    +    *
    +    * @param context session context
    +    * @param executor executor
    +    */
    +   private void openCli(SessionContext context, Executor executor) {
    +           final CliClient cli = new CliClient(context, executor);
    +           // interactive CLI mode
    +           if (options.getUpdateStatement() == null) {
    +                   cli.open();
    +           }
    +           // execute single update statement
    +           else {
    +                   final boolean success = 
cli.submitUpdate(options.getUpdateStatement());
    --- End diff --
    
    we do not wait for the query to complete?


> Add support for INSERT INTO in SQL Client
> -----------------------------------------
>
>                 Key: FLINK-8858
>                 URL: https://issues.apache.org/jira/browse/FLINK-8858
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Table API & SQL
>    Affects Versions: 1.6.0
>            Reporter: Renjie Liu
>            Assignee: Timo Walther
>            Priority: Major
>              Labels: pull-request-available
>
> The current design of SQL Client embedded mode doesn't support long running 
> queries. It would be useful for simple jobs that can be expressed in a single 
> sql statement if we can submit sql statements stored in files as long running 
> queries. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to