Skip to content

Commit 8724b94

Browse files
committed
Made read String as String by default. Option is to read as BinaryString with typehinting
1 parent 4867db6 commit 8724b94

2 files changed

Lines changed: 2 additions & 5 deletions

File tree

client-v2/src/main/java/com/clickhouse/client/api/ClientConfigProperties.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,10 +177,7 @@ public Object parseValue(String value) {
177177
* Defines mapping between ClickHouse data type and target Java type
178178
* Used by binary readers to convert values into desired Java type.
179179
*/
180-
TYPE_HINT_MAPPING("type_hint_mapping", Map.class,
181-
"String=" + BinaryString.class.getName()
182-
183-
),
180+
TYPE_HINT_MAPPING("type_hint_mapping", Map.class),
184181

185182
/**
186183
* SNI SSL parameter that will be set for each outbound SSL socket.

client-v2/src/main/java/com/clickhouse/client/api/data_formats/internal/AbstractBinaryFormatReader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ protected AbstractBinaryFormatReader(InputStream inputStream, QuerySettings quer
8383
BinaryStreamReader.ByteBufferAllocator byteBufferAllocator,
8484
Map<ClickHouseDataType, Class<?>> defaultTypeHintMap) {
8585
this.input = inputStream;
86-
this.defaultTypeHintMap = defaultTypeHintMap;
86+
this.defaultTypeHintMap = defaultTypeHintMap == null ? Collections.emptyMap() : defaultTypeHintMap;
8787
Map<String, Object> settings = querySettings == null ? Collections.emptyMap() : querySettings.getAllSettings();
8888
Boolean useServerTimeZone = (Boolean) settings.get(ClientConfigProperties.USE_SERVER_TIMEZONE.getKey());
8989
TimeZone timeZone = (useServerTimeZone == Boolean.TRUE && querySettings != null) ?

0 commit comments

Comments
 (0)