mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-10 11:07:06 +00:00
(improvement)(Headless) Optimize check of aggregate functions when creating metrics (#1785)
Co-authored-by: lxwcodemonkey
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user