mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-12 04:27:39 +00:00
[improvement][headless] In the translator, adopt Calcite to support multiple WITH structures and optimize the Calcite code. (#1747)
This commit is contained in:
@@ -1,38 +0,0 @@
|
||||
package com.tencent.supersonic.headless.api.pojo.enums;
|
||||
|
||||
public enum EngineType {
|
||||
TDW(0, "tdw"),
|
||||
MYSQL(1, "mysql"),
|
||||
DORIS(2, "doris"),
|
||||
CLICKHOUSE(3, "clickhouse"),
|
||||
KAFKA(4, "kafka"),
|
||||
H2(5, "h2"),
|
||||
POSTGRESQL(6, "postgresql"),
|
||||
OTHER(7, "other");
|
||||
|
||||
private Integer code;
|
||||
|
||||
private String name;
|
||||
|
||||
EngineType(Integer code, String name) {
|
||||
this.code = code;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public static EngineType fromString(String value) {
|
||||
for (EngineType engineType : EngineType.values()) {
|
||||
if (engineType.name().equalsIgnoreCase(value)) {
|
||||
return engineType;
|
||||
}
|
||||
}
|
||||
throw new IllegalArgumentException("Invalid value: " + value);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user