[improvement][launcher]Refactor built-in demos.

This commit is contained in:
jerryjzhang
2024-11-10 21:27:59 +08:00
parent 14a19a901f
commit ea6a9ebc5f
19 changed files with 2462 additions and 2808 deletions

View File

@@ -39,7 +39,8 @@ public class MetricRecommendProcessor implements ExecuteResultProcessor {
}
private void fillSimilarMetric(SemanticParseInfo parseInfo) {
if (!parseInfo.getQueryType().equals(QueryType.AGGREGATE)
if (Objects.isNull(parseInfo.getQueryType())
|| !parseInfo.getQueryType().equals(QueryType.AGGREGATE)
|| parseInfo.getMetrics().size() > METRIC_RECOMMEND_SIZE
|| CollectionUtils.isEmpty(parseInfo.getMetrics())) {
return;