[improve](clickhouse jdbc) support clickhouse jdbc 4.x version (#18258)

In clickhouse's 4.x version of jdbc, some UInt types use special Java types, so I adapted Doris's ClickHouse JDBC External
```
com.clickhouse.data.value.UnsignedByte;
com.clickhouse.data.value.UnsignedInteger;
com.clickhouse.data.value.UnsignedLong;
com.clickhouse.data.value.UnsignedShort;
```
This commit is contained in:
yongkang.zhong
2023-03-31 13:40:10 +08:00
committed by GitHub
parent 20b3bdb000
commit 1c2f95b887
4 changed files with 112 additions and 4 deletions

View File

@ -592,7 +592,7 @@ public class JdbcClient {
|| ckType.startsWith("FixedString")) {
return ScalarType.createStringType();
} else if (ckType.startsWith("DateTime")) {
return ScalarType.createDatetimeV2Type(0);
return ScalarType.createDatetimeV2Type(6);
} else if (ckType.startsWith("Array")) {
String cktype = ckType.substring(6, ckType.length() - 1);
fieldSchema.setDataTypeName(cktype);
@ -630,7 +630,6 @@ public class JdbcClient {
default:
return Type.UNSUPPORTED;
}
// Todo(zyk): Wait the JDBC external table support the array type then supported clickhouse array type
}
public Type oracleTypeToDoris(JdbcFieldSchema fieldSchema) {