flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pnowojski <...@git.apache.org>
Subject [GitHub] flink pull request #6332: [FLINK-8858] [sql-client] Add support for INSERT I...
Date Sat, 14 Jul 2018 17:29:49 GMT
Github user pnowojski commented on a diff in the pull request:

    https://github.com/apache/flink/pull/6332#discussion_r202520618
  
    --- Diff: flink-libraries/flink-sql-client/src/main/java/org/apache/flink/table/client/gateway/local/LocalExecutor.java
---
    @@ -329,14 +341,46 @@ public void stop(SessionContext session) {
     		}
     	}
     
    -	private <T> ResultDescriptor executeQueryInternal(ExecutionContext<T> context,
String query) {
    +	private <C> ProgramTargetDescriptor executeUpdateInternal(ExecutionContext<C>
context, String statement) {
    +		final ExecutionContext.EnvironmentInstance envInst = context.createEnvironmentInstance();
    +
    +		// apply update statement
    --- End diff --
    
    But there is no additional value of 
    ```
    // apply update statement
    ``` 
    over 
    ```
    applyUpdate(envInst.getTableEnvironment(), envInst.getQueryConfig(), statement);
    ```
    which is completely self explanatory. This is just form of some small code duplication.
Same applies to most of those comments.


---

Mime
View raw message