mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-11 12:07:42 +00:00
(Fix)(headless)Fix expression replacement issue. (#2024)
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user