fix: 获取字段描述失败

This commit is contained in:
taojinlong 2024-03-25 16:38:26 +08:00
parent 084d7a2ba5
commit 84653d6ef9

View File

@ -217,7 +217,7 @@ public class CalciteProvider {
if (StringUtils.isEmpty(configuration.getSchema())) { if (StringUtils.isEmpty(configuration.getSchema())) {
DEException.throwException(Translator.get("i18n_schema_is_empty")); DEException.throwException(Translator.get("i18n_schema_is_empty"));
} }
sql = String.format("SELECT COLNAME , TYPENAME , REMARKS FROM SYSCAT.COLUMNS WHERE TABSCHEMA = 'DB2INST1' AND TABNAME = 'MJQTEST' ", configuration.getSchema(), datasourceRequest.getTable()); sql = String.format("SELECT COLNAME , TYPENAME , REMARKS FROM SYSCAT.COLUMNS WHERE TABSCHEMA = '%s' AND TABNAME = '%s' ", configuration.getSchema(), datasourceRequest.getTable());
break; break;
case sqlServer: case sqlServer:
configuration = JsonUtil.parseObject(datasourceRequest.getDatasource().getConfiguration(), Sqlserver.class); configuration = JsonUtil.parseObject(datasourceRequest.getDatasource().getConfiguration(), Sqlserver.class);