mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-13 13:07:32 +00:00
(improvement)(Headless) Add integration testing for building data-model by LLM (#1848)
Co-authored-by: lxwcodemonkey
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.tencent.supersonic.headless.api.pojo;
|
||||
|
||||
import com.tencent.supersonic.common.pojo.enums.AggOperatorEnum;
|
||||
import com.tencent.supersonic.headless.api.pojo.enums.FieldType;
|
||||
import lombok.Data;
|
||||
|
||||
@@ -14,5 +15,8 @@ public class FieldSchema {
|
||||
|
||||
private FieldType filedType;
|
||||
|
||||
private AggOperatorEnum agg;
|
||||
|
||||
private String name;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.tencent.supersonic.headless.api.pojo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
@@ -15,4 +16,14 @@ public class ModelSchema {
|
||||
|
||||
private List<FieldSchema> filedSchemas;
|
||||
|
||||
@JsonIgnore
|
||||
public FieldSchema getFieldByName(String columnName) {
|
||||
for (FieldSchema fieldSchema : filedSchemas) {
|
||||
if (fieldSchema.getColumnName().equalsIgnoreCase(columnName)) {
|
||||
return fieldSchema;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ import lombok.Data;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class ModelSchemaReq {
|
||||
public class ModelBuildReq {
|
||||
|
||||
private Long databaseId;
|
||||
|
||||
Reference in New Issue
Block a user