Changed-lines coverage: PR changed C/C++ lines covered by tests: 83.08% (108/130) Uncovered changed code (with context): ================================================================================ src/DataTypes/Serializations/SerializationDateTime64.cpp ================================================================================ --- uncovered block 149-149 --- 147 | throw Exception(ErrorCodes::CANNOT_PARSE_NUMBER, "Cannot parse number with a leading '+' sign"); 148 | else >> 149 | return ReturnType(false); 150 | } 151 | --- uncovered block 187-187 --- 185 | throw Exception(ErrorCodes::CANNOT_PARSE_NUMBER, "Cannot parse number without any digits"); 186 | else >> 187 | return ReturnType(false); 188 | } 189 | if (*istr.position() == '.') --- uncovered block 217-218 --- 215 | throw Exception(ErrorCodes::CANNOT_PARSE_NUMBER, "Overflow while parsing a number"); 216 | } >> 217 | else if (!tryReadIntText(magnitude, istr) || magnitude > max_magnitude) >> 218 | return ReturnType(false); 219 | whole = static_cast(0 - magnitude); 220 | whole_has_digit = true; --- uncovered block 236-236 --- 234 | whole_has_digit = !istr.eof() && isNumericASCII(*istr.position()); 235 | if (!tryReadIntText(whole, istr)) >> 236 | return ReturnType(false); 237 | } 238 | --- uncovered block 261-265 --- 259 | throw Exception(ErrorCodes::CANNOT_PARSE_NUMBER, "Cannot parse number without any digits"); 260 | else >> 261 | return ReturnType(false); 262 | } 263 | 264 | /// Shared with the scalar readDateTime64Text path so both agree on pre-epoch sub-second signs. >> 265 | int negative_fraction_multiplier = adjustFractionalDateTimeSign(components, is_negative, scale); 266 | 267 | if constexpr (throw_exception) --- uncovered block 275-275 --- 273 | { 274 | if (!DecimalUtils::tryGetDecimalFromComponents(components, scale, x)) >> 275 | return ReturnType(false); 276 | x *= negative_fraction_multiplier; 277 | return ReturnType(true); --- uncovered block 393-394 --- 391 | else 392 | { >> 393 | if (!tryReadNumericText(x, scale, istr, settings.date_time_input_format)) >> 394 | return false; 395 | } 396 | assert_cast(column).getData().push_back(x); ================================================================================ src/IO/ReadHelpers.h ================================================================================ --- uncovered block 1177-1181 --- 1175 | if (!is_negative && components.whole < 0 && components.fractional != 0) 1176 | { >> 1177 | const auto scale_multiplier = DecimalUtils::scaleMultiplier(scale); >> 1178 | ++components.whole; >> 1179 | components.fractional = scale_multiplier - components.fractional; >> 1180 | if (!components.whole) >> 1181 | negative_fraction_multiplier = -1; 1182 | } 1183 | --- uncovered block 1295-1298 --- 1293 | throw Exception(ErrorCodes::CANNOT_PARSE_DATETIME, "Cannot parse DateTime64: no digits in the fractional unix timestamp"); 1294 | else >> 1295 | return ReturnType(false); 1296 | } 1297 | >> 1298 | negative_fraction_multiplier = adjustFractionalDateTimeSign(components, is_negative_timestamp, scale); 1299 | } 1300 | /// 10413792000 is time_t value for 2300-01-01 UTC (a bit over the last year supported by DateTime64) --- uncovered block 1356-1356 --- 1354 | 1355 | // try to parse the whole part >> 1356 | bool parse_success = false; 1357 | /// Cumulative byte offset before the whole part, to tell whether a whole digit was actually 1358 | /// consumed (the whole reader tolerates a sign-only whole such as `-.5`, leaving '.' unread). --- uncovered block 1390-1390 --- 1388 | && buf.count() == count_before_whole + (is_negative_timestamp ? 1 : 0); 1389 | if (!ok && !recover_on_leading_dot) >> 1390 | return ReturnType(false); 1391 | } 1392 | --- uncovered block 1412-1417 --- 1410 | { 1411 | if constexpr (throw_exception) >> 1412 | throw Exception(ErrorCodes::CANNOT_PARSE_DATETIME, "Cannot parse Time64: no digits in the fractional value"); 1413 | else >> 1414 | return ReturnType(false); 1415 | } 1416 | >> 1417 | negative_fraction_multiplier = adjustFractionalDateTimeSign(components, is_negative_timestamp, scale); 1418 | } 1419 | /// prevent overflow (taken from DateTime) WARNING: Failed to get start time for [Print Uncovered Code] - start time and duration won't be set --- Coverage counts --- Lines : baseline 882,216/1,028,184 -> current 882,269/1,028,276 (delta +53 / +92) Functions : baseline 947,192/1,022,067 -> current 947,193/1,022,077 (delta +1 / +10) Branches : baseline 284,707/365,288 -> current 284,822/365,344 (delta +115 / +56)