mirror of
https://github.com/tencentmusic/supersonic.git
synced 2026-01-24 12:33:19 +08:00
(improvement)(chat) support remove where condition and fix simplifySql space error and addAggregateToMetric optimize (#170)
This commit is contained in:
@@ -30,7 +30,7 @@ public class GroupByCorrector extends BaseSemanticCorrector {
|
||||
|
||||
if (!CollectionUtils.isEmpty(selectFields)
|
||||
&& !CollectionUtils.isEmpty(metrics)
|
||||
&& !selectFields.stream().anyMatch(s -> metrics.contains(s))) {
|
||||
&& selectFields.stream().anyMatch(s -> metrics.contains(s))) {
|
||||
//add aggregate to all metric
|
||||
addAggregateToMetric(semanticCorrectInfo);
|
||||
}
|
||||
|
||||
@@ -23,6 +23,9 @@ public class NatureHelper {
|
||||
|
||||
public static SchemaElementType convertToElementType(String nature) {
|
||||
DictWordType dictWordType = DictWordType.getNatureType(nature);
|
||||
if (Objects.isNull(dictWordType)) {
|
||||
return null;
|
||||
}
|
||||
SchemaElementType result = null;
|
||||
switch (dictWordType) {
|
||||
case METRIC:
|
||||
|
||||
Reference in New Issue
Block a user