fix(数据源): 修复获取字段重复的问题

This commit is contained in:
junjun 2024-04-26 11:22:36 +08:00
parent eeadf1a705
commit f13b20b044

View File

@ -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());