mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-11 20:25:12 +00:00
(improvement)(headless) performParsed skip translation (#1222)
This commit is contained in:
@@ -8,4 +8,5 @@ public class SqlInfo {
|
||||
private String s2SQL;
|
||||
private String correctS2SQL;
|
||||
private String querySQL;
|
||||
private String sourceId;
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ package com.tencent.supersonic.headless.api.pojo.enums;
|
||||
public enum AggOption {
|
||||
NATIVE,
|
||||
AGGREGATION,
|
||||
OUTER,
|
||||
DEFAULT;
|
||||
|
||||
public static AggOption getAggregation(boolean isNativeQuery) {
|
||||
@@ -15,6 +16,6 @@ public enum AggOption {
|
||||
}
|
||||
|
||||
public static boolean isAgg(AggOption aggOption) {
|
||||
return NATIVE.equals(aggOption) ? false : true;
|
||||
return NATIVE.equals(aggOption) || OUTER.equals(aggOption) ? false : true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -164,6 +164,7 @@ public class QueryStructReq extends SemanticQueryReq {
|
||||
result.setDataSetId(this.getDataSetId());
|
||||
result.setModelIds(this.getModelIdSet());
|
||||
result.setParams(new ArrayList<>());
|
||||
result.setSqlInfo(this.getSqlInfo());
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.tencent.supersonic.headless.api.pojo.request;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.tencent.supersonic.headless.api.pojo.Cache;
|
||||
import com.tencent.supersonic.headless.api.pojo.Param;
|
||||
import com.tencent.supersonic.headless.api.pojo.SqlInfo;
|
||||
import lombok.Data;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.codec.digest.DigestUtils;
|
||||
@@ -31,6 +32,8 @@ public abstract class SemanticQueryReq {
|
||||
|
||||
protected Cache cacheInfo = new Cache();
|
||||
|
||||
protected SqlInfo sqlInfo = new SqlInfo();
|
||||
|
||||
public void addModelId(Long modelId) {
|
||||
modelIds.add(modelId);
|
||||
}
|
||||
|
||||
@@ -17,4 +17,7 @@ public class ExplainResp implements Serializable {
|
||||
|
||||
private String sql;
|
||||
|
||||
private String sourceId;
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user