[improvement][headless] In the translator, adopt Calcite to support multiple WITH structures and optimize the Calcite code. (#1747)

This commit is contained in:
lexluo09
2024-09-30 18:53:27 +08:00
committed by GitHub
parent de2385cd2c
commit 8693e7f8a7
39 changed files with 234 additions and 126 deletions

View File

@@ -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);
}
}