[improvement][chat]Change query type resolution logic.

This commit is contained in:
jerryjzhang
2024-10-29 19:03:10 +08:00
parent ec6d7ba93d
commit 996cb3df56
3 changed files with 4 additions and 8 deletions

View File

@@ -30,10 +30,7 @@ public class SqlSelectFunctionHelper {
Arrays.asList("SUM", "COUNT", "MAX", "MIN", "AVG");
public static boolean hasAggregateFunction(String sql) {
if (!CollectionUtils.isEmpty(getFunctions(sql))) {
return true;
}
return SqlSelectHelper.hasGroupBy(sql);
return !CollectionUtils.isEmpty(getFunctions(sql));
}
public static boolean hasFunction(String sql, String functionName) {