(Fix)(headless)Fix expression replacement issue. (#2024)
Some checks failed
supersonic CentOS CI / build (21) (push) Has been cancelled
supersonic mac CI / build (21) (push) Has been cancelled
supersonic ubuntu CI / build (21) (push) Has been cancelled
supersonic windows CI / build (21) (push) Has been cancelled

This commit is contained in:
Jun Zhang
2025-01-30 08:54:42 +08:00
committed by GitHub
parent be5eeae707
commit de92b357df
18 changed files with 44 additions and 57 deletions

View File

@@ -55,12 +55,12 @@ public class DefaultSemanticTranslator implements SemanticTranslator {
private void mergeOntologyQuery(QueryStatement queryStatement) throws Exception {
OntologyQuery ontologyQuery = queryStatement.getOntologyQuery();
log.info("parse with ontology: [{}]", ontologyQuery);
if (Objects.isNull(ontologyQuery) || StringUtils.isBlank(ontologyQuery.getSql())) {
throw new Exception(String.format("parse ontology table [%s] error [%s]",
queryStatement.getSqlQuery().getTable(), queryStatement.getErrMsg()));
throw new Exception(String.format("parse ontology sql [%s] error [%s]",
StringUtils.normalizeSpace(queryStatement.getSqlQuery().getSql()),
queryStatement.getErrMsg()));
}
log.info("parse with ontologyQuery fields: [{}]", ontologyQuery.getFields());
SqlQuery sqlQuery = queryStatement.getSqlQuery();
String ontologyOuterSql = sqlQuery.getSql();

View File

@@ -139,7 +139,7 @@ public class SqlUtils {
throws SQLException {
Map<String, Object> map = new LinkedHashMap<>();
for (QueryColumn queryColumn : queryColumns) {
String colName = queryColumn.getNameEn();
String colName = queryColumn.getBizName();
Object value = rs.getObject(colName);
map.put(colName, getValue(value));
}