[fix][headless]Fix a set of known issues.
Some checks are pending
supersonic CentOS CI / build (21) (push) Waiting to run
supersonic mac CI / build (21) (push) Waiting to run
supersonic ubuntu CI / build (21) (push) Waiting to run
supersonic windows CI / build (21) (push) Waiting to run

This commit is contained in:
jerryjzhang
2025-01-14 14:47:35 +08:00
parent 329756056c
commit 2b28aeea6f
10 changed files with 44 additions and 25 deletions

View File

@@ -114,7 +114,7 @@ public class PromptHelper {
dimensionStr.append(dimension.getName());
if (!CollectionUtils.isEmpty(dimension.getAlias())) {
StringBuilder alias = new StringBuilder();
dimension.getAlias().stream().forEach(a -> alias.append(a + ","));
dimension.getAlias().stream().forEach(a -> alias.append(a + ";"));
dimensionStr.append(" ALIAS '" + alias + "'");
}
if (StringUtils.isNotEmpty(dimension.getTimeFormat())) {

View File

@@ -45,7 +45,7 @@ public class JdbcExecutor implements QueryExecutor {
sqlUtil.queryInternal(queryStatement.getSql(), queryResultWithColumns);
queryResultWithColumns.setSql(sql);
} catch (Exception e) {
log.error("queryInternal error [{}]", StringUtils.normalizeSpace(e.toString()));
log.error("queryInternal with error [{}]", StringUtils.normalizeSpace(e.getMessage()));
queryResultWithColumns.setErrorMsg(e.getMessage());
}
return queryResultWithColumns;

View File

@@ -45,6 +45,8 @@ public class SqlQueryParser implements QueryParser {
// build ontologyQuery
SqlQuery sqlQuery = queryStatement.getSqlQuery();
List<String> queryFields = SqlSelectHelper.getAllSelectFields(sqlQuery.getSql());
Set<String> queryAliases = SqlSelectHelper.getAliasFields(sqlQuery.getSql());
queryFields.removeAll(queryAliases);
Ontology ontology = queryStatement.getOntology();
OntologyQuery ontologyQuery = buildOntologyQuery(ontology, queryFields);
// check if there are fields not matched with any metric or dimension