mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-11 03:58:14 +00:00
[fix][headless]Fix expr conversion issue.
This commit is contained in:
@@ -202,8 +202,7 @@ public class DatabaseServiceImpl extends ServiceImpl<DatabaseDOMapper, DatabaseD
|
||||
@Override
|
||||
public List<String> getDbNames(Long id) throws SQLException {
|
||||
DatabaseResp databaseResp = getDatabase(id);
|
||||
DbAdaptor dbAdaptor =
|
||||
DbAdaptorFactory.getEngineAdaptor(databaseResp.getType().toUpperCase());
|
||||
DbAdaptor dbAdaptor = DbAdaptorFactory.getEngineAdaptor(databaseResp.getType());
|
||||
return dbAdaptor.getDBs(DatabaseConverter.getConnectInfo(databaseResp));
|
||||
}
|
||||
|
||||
|
||||
@@ -271,26 +271,24 @@ public class ModelConverter {
|
||||
|
||||
if (measures != null) {
|
||||
for (Measure measure : measures) {
|
||||
if (StringUtils.isBlank(measure.getBizName())) {
|
||||
continue;
|
||||
if (StringUtils.isNotBlank(measure.getBizName())
|
||||
&& StringUtils.isBlank(measure.getExpr())) {
|
||||
measure.setExpr(measure.getBizName());
|
||||
}
|
||||
measure.setExpr(measure.getBizName());
|
||||
}
|
||||
}
|
||||
if (dimensions != null) {
|
||||
for (Dimension dimension : dimensions) {
|
||||
if (StringUtils.isBlank(dimension.getBizName())) {
|
||||
continue;
|
||||
if (StringUtils.isNotBlank(dimension.getBizName())
|
||||
&& StringUtils.isBlank(dimension.getExpr())) {
|
||||
dimension.setExpr(dimension.getBizName());
|
||||
}
|
||||
dimension.setExpr(dimension.getBizName());
|
||||
}
|
||||
}
|
||||
if (identifiers != null) {
|
||||
for (Identify identify : identifiers) {
|
||||
if (StringUtils.isBlank(identify.getBizName())) {
|
||||
continue;
|
||||
}
|
||||
if (StringUtils.isBlank(identify.getName())) {
|
||||
if (StringUtils.isNotBlank(identify.getBizName())
|
||||
&& StringUtils.isBlank(identify.getName())) {
|
||||
identify.setName(identify.getBizName());
|
||||
}
|
||||
identify.setIsCreateDimension(1);
|
||||
|
||||
Reference in New Issue
Block a user