JackieTien97 commented on code in PR #14809:
URL: https://github.com/apache/iotdb/pull/14809#discussion_r1950554399
##########
iotdb-client/service-rpc/src/main/java/org/apache/iotdb/rpc/RpcUtils.java:
##########
@@ -375,7 +375,10 @@ public static boolean isUseDatabase(String sql) {
}
public static boolean isSetSqlDialect(String sql) {
- return sql.length() > 15 && "set
sql_dialect".equalsIgnoreCase(sql.substring(0, 15));
+ sql = sql.toLowerCase();
+ return sql.length() > 15
+ && "set ".equals(sql.substring(0, 4))
+ && sql.substring(4).trim().startsWith("sql_dialect");
Review Comment:
```suggestion
return sql.length() > 15
&& "set ".equalsIgnoreCase(sql.substring(0, 4))
&& sql.substring(4).trim().toLowerCase().startsWith("sql_dialect");
```
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]