(improvement)(Headless) The corrector adds group by field, but does not add agg field, resulting in SQL syntax errors (#1082)

Co-authored-by: jolunoluo
This commit is contained in:
LXW
2024-06-03 16:15:45 +08:00
committed by GitHub
parent 778f054a95
commit df9b469019
3 changed files with 18 additions and 6 deletions

View File

@@ -96,6 +96,11 @@ public class SemanticSchema implements Serializable {
return getElementsByDataSetId(dataSetId, metrics);
}
public List<String> getMetricNames() {
return getMetrics().stream()
.map(SchemaElement::getName).collect(Collectors.toList());
}
public List<SchemaElement> getEntities() {
List<SchemaElement> entities = new ArrayList<>();
dataSetSchemaList.stream().forEach(d -> entities.add(d.getEntity()));