zhangjun0x01 commented on a change in pull request #1893:
URL: https://github.com/apache/iceberg/pull/1893#discussion_r558228728



##########
File path: flink/src/test/java/org/apache/iceberg/flink/FlinkTestBase.java
##########
@@ -73,15 +73,15 @@ protected TableEnvironment getTableEnv() {
   }
 
   protected static TableResult exec(TableEnvironment env, String query, 
Object... args) {
-    return env.executeSql(String.format(query, args));
+    return env.executeSql(args.length > 0 ? String.format(query, args) : 
query);
   }
 
   protected TableResult exec(String query, Object... args) {
     return exec(getTableEnv(), query, args);
   }
 
   protected List<Object[]> sql(String query, Object... args) {
-    TableResult tableResult = exec(String.format(query, args));
+    TableResult tableResult = exec(query, args);

Review comment:
       I remove the ` return env.executeSql(args.length > 0 ? 
String.format(query, args) : query);` from `exec` method, but if we retain the 
`String.format` in `sql(String query, Object... args)` method ,the sql will 
still be formatted twice,even though we use the `%%` , the sql also is formated 
failed




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to