mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-10 19:18:23 +00:00
Merge pull request #2303 from Willy-J/fixbug2
(fix)(headless) add empty check for metric alias to prevent incorrect DataFormatType assignment
This commit is contained in:
@@ -109,7 +109,7 @@ public class QueryUtils {
|
||||
column.setModelId(metric.getModelId());
|
||||
}
|
||||
// if column nameEn contains metric alias, use metric dataFormatType
|
||||
if (column.getDataFormatType() == null && metric.getAlias() != null) {
|
||||
if (column.getDataFormatType() == null && StringUtils.isNotEmpty(metric.getAlias())) {
|
||||
for (String alias : metric.getAlias().split(",")) {
|
||||
if (nameEn.contains(alias)) {
|
||||
column.setDataFormatType(metric.getDataFormatType());
|
||||
|
||||
Reference in New Issue
Block a user