zhangjun0x01 commented on a change in pull request #1893:
URL: https://github.com/apache/iceberg/pull/1893#discussion_r551859042
##########
File path: flink/src/test/java/org/apache/iceberg/flink/FlinkTestBase.java
##########
@@ -72,8 +72,21 @@ protected TableEnvironment getTableEnv() {
return tEnv;
}
+ /**
+ * if we have a sql with '%' , for example : SELECT * FROM mytable WHERE
data LIKE 'a%'. the format operation will
+ * throw an exception, so we add a sql method to execute the original sql
+ *
+ * @param query the sql
+ * @param args the args to format sql
+ * @return the formated sql
+ */
protected List<Object[]> sql(String query, Object... args) {
- TableResult tableResult = getTableEnv().executeSql(String.format(query,
args));
+ String sql = String.format(query, args);
+ return sql(sql);
+ }
+
+ protected List<Object[]> sql(String sql) {
+ TableResult tableResult = getTableEnv().executeSql(sql);
Review comment:
I update it
----------------------------------------------------------------
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]