Closed alniks closed 1 month ago
BinaryStreamReader does not use scale of a column when parsing DateTime64 value
correct dates are read by client
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")); }
constant 3 is used instead of column.getScale()
3
column.getScale()
case DateTime64: return convertDateTime(readDateTime64(3, column.getTimeZone() == null ? timeZone : column.getTimeZone()), typeHint);
@alniks Thank you for reporting! Will fix.
Describe the bug
BinaryStreamReader does not use scale of a column when parsing DateTime64 value
Steps to reproduce
Expected behaviour
correct dates are read by client
Code example
Problematic code in BinaryStreamReader
constant
3
is used instead ofcolumn.getScale()