public static LocalDateTime readDateTime(ClickHouseInputStream input, int scale, TimeZone tz) throws IOException {
        return ClickHouseChecker.between(scale, ClickHouseValues.PARAM_SCALE, 0,
                ClickHouseDataType.DateTime64.getMaxScale()) == 0 ? readDateTime32(input, tz)
                        : readDateTime64(input, scale, tz);
    }
Read {@link java.time.LocalDateTime} from given input stream.

@param input non-null input stream
@param scale scale of the datetime, must between 0 and 9 inclusive
@param tz    time zone, null is treated as UTC
@return local datetime
@throws IOException when failed to read value from input stream or reached
                    end of the stream
clickhouse-data/src/main/java/com/clickhouse/data/format/BinaryStreamUtils.java