mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-11 03:58:14 +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) {
|
private static boolean hasAggregateFunction(String expr) {
|
||||||
String sql = String.format("select %s from table", expr);
|
return !CollectionUtils.isEmpty(SqlSelectFunctionHelper.getAggregateFunctions(expr));
|
||||||
return SqlSelectFunctionHelper.hasAggregateFunction(sql);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user