mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-12 20:51:48 +00:00
[improvement][headless] fixed error sql order item is the same as the agg alias (#1016)
This commit is contained in:
@@ -73,6 +73,10 @@ public class QueryReqConverter {
|
||||
if (StringUtils.isEmpty(tableName)) {
|
||||
return new QueryStatement();
|
||||
}
|
||||
// correct order item is same as agg alias
|
||||
String reqSql = querySQLReq.getSql();
|
||||
querySQLReq.setSql(SqlReplaceHelper.replaceAggAliasOrderItem(querySQLReq.getSql()));
|
||||
log.info("replaceOrderAggSameAlias {} -> {}", reqSql, querySQLReq.getSql());
|
||||
//4.build MetricTables
|
||||
List<String> allFields = SqlSelectHelper.getAllFields(querySQLReq.getSql());
|
||||
List<MetricSchemaResp> metricSchemas = getMetrics(semanticSchemaResp, allFields);
|
||||
|
||||
Reference in New Issue
Block a user