-
Couldn't load subscription status.
- Fork 613
Closed
Milestone
Description
Describe the bug
BinaryStreamReader does not use scale of a column when parsing DateTime64 value
Steps to reproduce
- create table with DateTime64 column
- read DateTime64 values
Expected behaviour
correct dates are read by client
Code example
ClickHouseBinaryFormatReader reader = chDirectClient.newBinaryFormatReader(response);
while (reader.hasNext()) {
Map<String, Object> tuple = reader.next();
assertEquals("2024-10-07 06:59:35.107361000", tuple.get("event_time"));
}Problematic code in BinaryStreamReader
constant 3 is used instead of column.getScale()
case DateTime64:
return convertDateTime(readDateTime64(3, column.getTimeZone() == null ? timeZone :
column.getTimeZone()), typeHint);joschi