[improvement](chat) Added query type parsing, supporting metrics, entities, and other query types. (#392)

This commit is contained in:
lexluo09
2023-11-16 17:08:56 +08:00
committed by GitHub
parent 8c65ac80b5
commit 46a9e5b097
8 changed files with 139 additions and 9 deletions

View File

@@ -0,0 +1,19 @@
package com.tencent.supersonic.chat.api.pojo;
/***
* Query Type
*/
public enum QueryType {
/**
* queries with metrics included in the select statement
*/
METRIC,
/**
* queries with entity unique key included in the select statement
*/
ENTITY,
/**
* the other queries
*/
OTHER
}

View File

@@ -40,6 +40,7 @@ public class SemanticParseInfo {
private Map<String, Object> properties = new HashMap<>();
private EntityInfo entityInfo;
private SqlInfo sqlInfo = new SqlInfo();
private QueryType queryType = QueryType.OTHER;
public Long getModelId() {
return model != null ? model.getId() : 0L;