(improvement)(Headless) define the measure without agg funciton by the model (#1864)

This commit is contained in:
jipeli
2024-10-30 22:13:13 +08:00
committed by GitHub
parent 68d5dac14c
commit 858feb9c3c
4 changed files with 36 additions and 6 deletions

View File

@@ -171,6 +171,11 @@ public class QueryReqConverter {
log.debug("getAggOption find null defaultAgg metric set to NATIVE");
return AggOption.OUTER;
}
if (!SqlSelectFunctionHelper.hasAggregateFunction(sql) && !SqlSelectHelper.hasGroupBy(sql)
&& !SqlSelectHelper.hasWith(sql) && !SqlSelectHelper.hasSubSelect(sql)) {
log.debug("getAggOption simple sql set to NATIVE");
return AggOption.NATIVE;
}
return AggOption.DEFAULT;
}