Skip to content

Commit 67bafe3

Browse files
committed
added new type to enum
1 parent 7ee6499 commit 67bafe3

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

clickhouse-data/src/main/java/com/clickhouse/data/ClickHouseDataType.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import java.time.Duration;
88
import java.time.LocalDate;
99
import java.time.LocalDateTime;
10+
import java.time.LocalTime;
1011
import java.time.Period;
1112
import java.time.ZonedDateTime;
1213
import java.time.temporal.ChronoUnit;
@@ -55,6 +56,8 @@ public enum ClickHouseDataType {
5556
DateTime(LocalDateTime.class, true, false, false, 0, 29, 0, 0, 9, false, 0x11, "TIMESTAMP"),
5657
DateTime32(LocalDateTime.class, true, false, false, 4, 19, 0, 0, 0, false, 0x12),
5758
DateTime64(LocalDateTime.class, true, false, false, 8, 29, 3, 0, 9, false, 0x14), // we always write timezone as argument
59+
Time64(LocalTime.class, true, false, false, 8, 19, 0, 0, 0, false, 0x35), // // we always write timezone as argument
60+
Time(LocalTime.class, true, false, false, 8, 19, 0, 0, 0, false, 0x32), // // we always write timezone as argument
5861
Enum(String.class, true, true, false, 0, 0, 0, 0, 0, false),
5962
Enum8(String.class, true, true, false, 1, 0, 0, 0, 0, false, 0x17, "ENUM"),
6063
Enum16(String.class, true, true, false, 2, 0, 0, 0, 0, false, 0x18),

jdbc-v2/src/main/java/com/clickhouse/jdbc/internal/JdbcUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ private static Map<ClickHouseDataType, Class<?>> getDataTypeClassMap() {
124124

125125
public static SQLType convertToSqlType(ClickHouseDataType clickhouseType) {
126126
if (clickhouseType == null) {
127-
return JDBCType.NULL;
127+
return JDBCType.OTHER;
128128
}
129129

130130
return CLICKHOUSE_TO_SQL_TYPE_MAP.getOrDefault(clickhouseType, JDBCType.OTHER);

0 commit comments

Comments
 (0)