mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-11 20:25:12 +00:00
(improvement)(chat) Special handling for count_distinct operator during SQL correcting and explaining (#320)
This commit is contained in:
@@ -125,7 +125,8 @@ public class QueryReqConverter {
|
||||
// if there is count() in S2QL,set MetricTable's aggOption to "NATIVE"
|
||||
String sql = databaseReq.getSql();
|
||||
if (!SqlParserSelectHelper.hasGroupBy(sql)
|
||||
|| SqlParserSelectFunctionHelper.hasFunction(sql, "count")) {
|
||||
|| SqlParserSelectFunctionHelper.hasFunction(sql, "count")
|
||||
|| SqlParserSelectFunctionHelper.hasFunction(sql, "count_distinct")) {
|
||||
return AggOption.NATIVE;
|
||||
}
|
||||
return AggOption.DEFAULT;
|
||||
|
||||
Reference in New Issue
Block a user