mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-13 21:17:08 +00:00
[improvement][common]Replace QueryType.OTHER with ID
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.tencent.supersonic.common.pojo;
|
||||
package com.tencent.supersonic.common.pojo.enums;
|
||||
|
||||
public enum ReturnCode {
|
||||
SUCCESS(200, "success"),
|
||||
Reference in New Issue
Block a user