forked from github/dataease
fix(数据源): 修复获取字段重复的问题
This commit is contained in:
parent
eeadf1a705
commit
f13b20b044
@ -461,7 +461,17 @@ public class CalciteProvider {
|
||||
}
|
||||
resultSet = statement.executeQuery(getTableFiledSql(datasourceRequest));
|
||||
while (resultSet.next()) {
|
||||
datasetTableFields.add(getTableFieldDesc(datasourceRequest, resultSet));
|
||||
TableField tableFieldDesc = getTableFieldDesc(datasourceRequest, resultSet);
|
||||
boolean repeat = false;
|
||||
for (TableField ele : datasetTableFields) {
|
||||
if (StringUtils.equalsIgnoreCase(ele.getOriginName(), tableFieldDesc.getOriginName())) {
|
||||
repeat = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!repeat) {
|
||||
datasetTableFields.add(tableFieldDesc);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
DEException.throwException(e.getMessage());
|
||||
|
Loading…
Reference in New Issue
Block a user