Merge pull request #8681 from dataease/pr@dev-v2@fixdesc

fix: 获取字段描述失败
This commit is contained in:
taojinlong 2024-03-25 16:41:27 +08:00 committed by GitHub
commit 78a88cdd72
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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