[improvement][common]Replace QueryType.OTHER with ID

This commit is contained in:
jerryjzhang
2023-12-11 11:32:18 +08:00
parent 23d926f195
commit 221e88de0f
25 changed files with 51 additions and 50 deletions

View File

@@ -1,23 +0,0 @@
package com.tencent.supersonic.common.pojo;
/***
* Query Type
*/
public enum QueryType {
/**
* queries with metrics included in the select statement
*/
METRIC,
/**
* queries with only tag included in the select statement
*/
TAG,
/**
* the other queries
*/
OTHER;
public boolean isNativeAggQuery() {
return TAG.equals(this);
}
}

View File

@@ -1,5 +1,6 @@
package com.tencent.supersonic.common.pojo;
import com.tencent.supersonic.common.pojo.enums.ReturnCode;
import com.tencent.supersonic.common.util.TraceIdUtil;
import lombok.Data;
import org.slf4j.MDC;

View File

@@ -0,0 +1,23 @@
package com.tencent.supersonic.common.pojo.enums;
/**
* Enumerate query types supported by SuperSonic.
*/
public enum QueryType {
/**
* queries with metric calculation (optionally slice and dice by dimensions)
*/
METRIC,
/**
* queries with tag-based entity targeting
*/
TAG,
/**
* queries with ID-based entity selection
*/
ID;
public boolean isNativeAggQuery() {
return TAG.equals(this);
}
}

View File

@@ -1,4 +1,4 @@
package com.tencent.supersonic.common.pojo;
package com.tencent.supersonic.common.pojo.enums;
public enum ReturnCode {
SUCCESS(200, "success"),