(improvement)(Headless) Optimize check of aggregate functions when creating metrics (#1785)

Co-authored-by: lxwcodemonkey
This commit is contained in:
LXW
2024-10-11 16:46:34 +08:00
committed by GitHub
parent fbf0ea0627
commit 4408bf4325

View File

@@ -64,7 +64,7 @@ public class MetricCheckUtils {
}
private static boolean hasAggregateFunction(String expr) {
String sql = String.format("select %s from table", expr);
return SqlSelectFunctionHelper.hasAggregateFunction(sql);
return !CollectionUtils.isEmpty(SqlSelectFunctionHelper.getAggregateFunctions(expr));
}
}