mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-11 12:07:42 +00:00
[fix][headless]Fix a set of known issues.
This commit is contained in:
@@ -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())) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user