Changed-lines coverage: PR changed C/C++ lines covered by tests: 87.35% (601/688) Uncovered changed code (with context): ================================================================================ src/AggregateFunctions/AggregateFunctionMVTEncode.cpp ================================================================================ --- uncovered block 409-409 --- 407 | const TilePoints points = readPointSequence(geometry, getName()); 408 | if (points.empty()) >> 409 | throw Exception(ErrorCodes::BAD_ARGUMENTS, "Aggregate function {} received an empty MultiPoint", getName()); 410 | MVT::writeVarint(out, (MVTCommand::MoveTo & 0x7) | (static_cast(points.size()) << 3)); 411 | for (const auto & [x, y] : points) --- uncovered block 420-422 --- 418 | return MVTGeomType::Point; 419 | } >> 420 | case GeoDisc::Ring: >> 421 | emitRing(out, readPointSequence(geometry, getName()), /*exterior=*/true, cursor_x, cursor_y); >> 422 | return MVTGeomType::Polygon; 423 | case GeoDisc::Polygon: 424 | emitPolygon(out, geometry, cursor_x, cursor_y, getName()); ================================================================================ src/Common/WKB.cpp ================================================================================ --- uncovered block 37-42 --- 35 | return "MultiLineString"; 36 | else if (std::holds_alternative>(object)) >> 37 | return "Polygon"; >> 38 | else if (std::holds_alternative>(object)) >> 39 | return "MultiPolygon"; >> 40 | else if (std::holds_alternative>(object)) >> 41 | return "MultiPoint"; >> 42 | throw Exception(ErrorCodes::BAD_ARGUMENTS, "Unknown geometric object"); 43 | } 44 | --- uncovered block 131-131 --- 129 | auto current_point = parseWKBFormat(in_buffer, limit); 130 | if (!std::holds_alternative(current_point)) >> 131 | throw Exception(ErrorCodes::BAD_ARGUMENTS, "MultiPoint contains an internal type {} that differs from Point", getGeometricObjectTypeName(current_point)); 132 | multipoint.push_back(std::get(current_point)); 133 | } ================================================================================ src/DataTypes/DataTypeVariant.cpp ================================================================================ --- uncovered block 30-34 --- 28 | { 29 | if (isNullableOrLowCardinalityNullable(type)) >> 30 | throw Exception(ErrorCodes::BAD_ARGUMENTS, "Nullable/LowCardinality(Nullable) types are not allowed inside Variant type"); 31 | if (type->getTypeId() == TypeIndex::Variant) >> 32 | throw Exception(ErrorCodes::BAD_ARGUMENTS, "Nested Variant types are not allowed"); 33 | if (type->getTypeId() == TypeIndex::Dynamic) >> 34 | throw Exception(ErrorCodes::BAD_ARGUMENTS, "Dynamic type is not allowed inside Variant type"); 35 | } 36 | --- uncovered block 43-43 --- 41 | 42 | if (variants.size() > ColumnVariant::MAX_NESTED_COLUMNS) >> 43 | throw Exception(ErrorCodes::BAD_ARGUMENTS, "Variant type with more than {} nested types is not allowed", ColumnVariant::MAX_NESTED_COLUMNS); 44 | } 45 | --- uncovered block 74-77 --- 72 | 73 | if (isNothing(type)) >> 74 | throw Exception(ErrorCodes::BAD_ARGUMENTS, "Nothing type is not allowed in a Variant with a fixed discriminator order"); 75 | 76 | if (!names.insert(type->getName()).second) >> 77 | throw Exception(ErrorCodes::BAD_ARGUMENTS, "Duplicate type {} in a Variant with a fixed discriminator order", type->getName()); 78 | 79 | variants.push_back(type); ================================================================================ src/DataTypes/DataTypeVariant.h ================================================================================ --- uncovered block 41-41 --- 39 | 40 | TypeIndex getTypeId() const override { return TypeIndex::Variant; } >> 41 | const char * getFamilyName() const override { return "Variant"; } 42 | 43 | bool canBeInsideNullable() const override { return false; } ================================================================================ src/Functions/MVTEncodeGeom.cpp ================================================================================ --- uncovered block 304-309 --- 302 | const auto geometry_type = removeNullable(arguments[0].type); 303 | if (geometry_type->getName() != "Geometry" && !getGeometryColumnTypeFromDataType(geometry_type)) >> 304 | throw Exception( >> 305 | ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, >> 306 | "The first argument of function {} must be a geometry (Point, MultiPoint, LineString, MultiLineString, Ring, Polygon, " >> 307 | "MultiPolygon or Geometry), got {}", >> 308 | getName(), >> 309 | arguments[0].type->getName()); 310 | 311 | /// zoom, tile_x, tile_y, extent, buffer and clip must be unsigned integers (matching MVTBoundingBox); accepting --- uncovered block 430-436 --- 428 | bg::set<1>(p, roundCoordinate(bg::get<1>(p))); 429 | if (clip && !bg::covered_by(p, box)) >> 430 | continue; 431 | result.push_back(p); 432 | } 433 | if (result.empty()) 434 | { >> 435 | builder.addNull(); >> 436 | return; 437 | } 438 | builder.addMultiPoint(result); --- uncovered block 558-558 --- 556 | auto dispatch_ring = [&](const Ring & g, const Projection & pr, const BBox & b, bool c) 557 | { >> 558 | Polygon poly; 559 | poly.outer() = g; 560 | MultiPolygon m; --- uncovered block 583-589 --- 581 | return converter(variant.getVariantPtrByGlobalDiscriminator(disc)); 582 | }; >> 583 | auto points = convert_sub(GeoDisc::Point, [](ColumnPtr c) { return c ? ColumnToPointsConverter::convert(c) : VectorWithMemoryTracking{}; }); >> 584 | auto lines = convert_sub(GeoDisc::LineString, [](ColumnPtr c) { return c ? ColumnToLineStringsConverter::convert(c) : VectorWithMemoryTracking>{}; }); >> 585 | auto mlines = convert_sub(GeoDisc::MultiLineString, [](ColumnPtr c) { return c ? ColumnToMultiLineStringsConverter::convert(c) : VectorWithMemoryTracking>{}; }); >> 586 | auto mpoints = convert_sub(GeoDisc::MultiPoint, [](ColumnPtr c) { return c ? ColumnToMultiPointsConverter::convert(c) : VectorWithMemoryTracking>{}; }); >> 587 | auto rings = convert_sub(GeoDisc::Ring, [](ColumnPtr c) { return c ? ColumnToRingsConverter::convert(c) : VectorWithMemoryTracking>{}; }); >> 588 | auto polygons = convert_sub(GeoDisc::Polygon, [](ColumnPtr c) { return c ? ColumnToPolygonsConverter::convert(c) : VectorWithMemoryTracking>{}; }); >> 589 | auto mpolygons = convert_sub(GeoDisc::MultiPolygon, [](ColumnPtr c) { return c ? ColumnToMultiPolygonsConverter::convert(c) : VectorWithMemoryTracking>{}; }); 590 | 591 | for (size_t row = 0; row < input_rows_count; ++row) --- uncovered block 609-615 --- 607 | switch (disc) 608 | { >> 609 | case GeoDisc::Point: dispatch(points[off], projection, box, clip); break; >> 610 | case GeoDisc::LineString: dispatch_line(lines[off], projection, box, clip); break; >> 611 | case GeoDisc::MultiLineString: dispatch_mline(mlines[off], projection, box, clip); break; >> 612 | case GeoDisc::MultiPoint: dispatch_mpoint(mpoints[off], projection, box, clip); break; >> 613 | case GeoDisc::Ring: dispatch_ring(rings[off], projection, box, clip); break; >> 614 | case GeoDisc::Polygon: dispatch_polygon(polygons[off], projection, box, clip); break; >> 615 | case GeoDisc::MultiPolygon: dispatch_mpolygon(mpolygons[off], projection, box, clip); break; 616 | default: builder.addNull(); break; 617 | } --- uncovered block 640-644 --- 638 | dispatch_line(geometries[row], projection, box, clip); 639 | else if constexpr (std::is_same_v>) >> 640 | dispatch_mline(geometries[row], projection, box, clip); 641 | else if constexpr (std::is_same_v>) 642 | dispatch_mpoint(geometries[row], projection, box, clip); 643 | else if constexpr (std::is_same_v>) >> 644 | dispatch_ring(geometries[row], projection, box, clip); 645 | else if constexpr (std::is_same_v>) 646 | dispatch_polygon(geometries[row], projection, box, clip); ================================================================================ src/Functions/geometry.h ================================================================================ --- uncovered block 263-263 --- 261 | auto type = magic_enum::enum_cast(global_discr); 262 | if (!type) >> 263 | throw Exception(ErrorCodes::BAD_ARGUMENTS, "Unknown type of geometry {}", static_cast(global_discr)); 264 | processField(field, *type, res_data); 265 | } ================================================================================ src/Functions/h3PolygonToCells.cpp ================================================================================ --- uncovered block 125-129 --- 123 | throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "The first argument of function {} must not be Point", getName()); 124 | if constexpr (std::is_same_v, Converter>) >> 125 | throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "The first argument of function {} must not be LineString", getName()); 126 | if constexpr (std::is_same_v, Converter>) 127 | throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "The first argument of function {} must not be MultiLineString", getName()); 128 | if constexpr (std::is_same_v, Converter>) >> 129 | throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "The first argument of function {} must not be MultiPoint", getName()); 130 | 131 | if (input_rows_count == 0) ================================================================================ src/Functions/h3PolygonToCellsWithContainment.cpp ================================================================================ --- uncovered block 208-209 --- 206 | "The first argument of function {} must not be MultiLineString", getName()); 207 | if constexpr (std::is_same_v, Converter>) >> 208 | throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, >> 209 | "The first argument of function {} must not be MultiPoint", getName()); 210 | if (input_rows_count == 0) 211 | return; ================================================================================ src/Functions/polygonsIntersect.cpp ================================================================================ --- uncovered block 77-77 --- 75 | std::is_same_v, LeftConverter> 76 | || std::is_same_v, RightConverter>) >> 77 | throw Exception( 78 | ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "Any argument of function {} must not be MultiLineString", getName()); 79 | else if constexpr ( ================================================================================ src/Functions/polygonsIntersection.cpp ================================================================================ --- uncovered block 77-79 --- 75 | throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "Any argument of function {} must not be Point", getName()); 76 | else if constexpr (std::is_same_v, LeftConverter> || std::is_same_v, RightConverter>) >> 77 | throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "Any argument of function {} must not be LineString", getName()); 78 | else if constexpr (std::is_same_v, LeftConverter> || std::is_same_v, RightConverter>) >> 79 | throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "Any argument of function {} must not be MultiLineString", getName()); 80 | else if constexpr (std::is_same_v, LeftConverter> || std::is_same_v, RightConverter>) 81 | throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "Any argument of function {} must not be MultiPoint", getName()); ================================================================================ src/Functions/polygonsSymDifference.cpp ================================================================================ --- uncovered block 75-77 --- 73 | throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "Any argument of function {} must not be Point", getName()); 74 | else if constexpr (std::is_same_v, LeftConverter> || std::is_same_v, RightConverter>) >> 75 | throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "Any argument of function {} must not be LineString", getName()); 76 | else if constexpr (std::is_same_v, LeftConverter> || std::is_same_v, RightConverter>) >> 77 | throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "Any argument of function {} must not be MultiLineString", getName()); 78 | else if constexpr (std::is_same_v, LeftConverter> || std::is_same_v, RightConverter>) 79 | throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "Any argument of function {} must not be MultiPoint", getName()); ================================================================================ src/Functions/polygonsUnion.cpp ================================================================================ --- uncovered block 75-77 --- 73 | throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "Any argument of function {} must not be Point", getName()); 74 | else if constexpr (std::is_same_v, LeftConverter> || std::is_same_v, RightConverter>) >> 75 | throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "Any argument of function {} must not be LineString", getName()); 76 | else if constexpr (std::is_same_v, LeftConverter> || std::is_same_v, RightConverter>) >> 77 | throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "Any argument of function {} must not be MultiLineString", getName()); 78 | else if constexpr (std::is_same_v, LeftConverter> || std::is_same_v, RightConverter>) 79 | throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "Any argument of function {} must not be MultiPoint", getName()); ================================================================================ src/Functions/polygonsWithin.cpp ================================================================================ --- uncovered block 84-86 --- 82 | throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "Any argument of function {} must not be Point", getName()); 83 | else if constexpr (std::is_same_v, LeftConverter> || std::is_same_v, RightConverter>) >> 84 | throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "Any argument of function {} must not be LineString", getName()); 85 | else if constexpr (std::is_same_v, LeftConverter> || std::is_same_v, RightConverter>) >> 86 | throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "Any argument of function {} must not be MultiLineString", getName()); 87 | else if constexpr (std::is_same_v, LeftConverter> || std::is_same_v, RightConverter>) 88 | throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "Any argument of function {} must not be MultiPoint", getName()); ================================================================================ src/Functions/readWkt.cpp ================================================================================ --- uncovered block 247-247 --- 245 | }, 246 | str, "ring", WKTTypes::Ring)) >> 247 | continue; 248 | 249 | if (try_deserialize_type( ================================================================================ src/Processors/Formats/Impl/ArrowGeoTypes.cpp ================================================================================ --- uncovered block 230-249 --- 228 | inline MultiPoint parseWKTMultiPoint(ReadBuffer & in_buffer, bool precise_float_parsing) 229 | { >> 230 | MultiPoint result; >> 231 | readOpenBracket(in_buffer); >> 232 | while (true) 233 | { 234 | /// Both MULTIPOINT (1 1, 2 2) and MULTIPOINT ((1 1), (2 2)) are valid WKT spellings. 235 | /// Reuse the shared separator/bracket helpers so this path stays as strict as readWKT: 236 | /// any separator (space, tab, newline) is tolerated, and a parenthesized point must be 237 | /// closed by ')' with nothing but separators in between (so "MULTIPOINT ((1 1 x))" throws). >> 238 | skipWKTSeparators(in_buffer); >> 239 | char ch = 0; >> 240 | const bool parenthesized = in_buffer.peek(ch) && ch == '('; >> 241 | if (parenthesized) >> 242 | in_buffer.ignore(); >> 243 | result.push_back(parseWKTPoint(in_buffer, precise_float_parsing)); >> 244 | if (parenthesized) >> 245 | readCloseBracket(in_buffer); >> 246 | if (readItemEnding(in_buffer)) >> 247 | break; 248 | } >> 249 | return result; 250 | } 251 | --- uncovered block 309-309 --- 307 | result = parseWKTPolygon(in_buffer, precise_float_parsing); 308 | else if (type == "MULTIPOINT") >> 309 | result = parseWKTMultiPoint(in_buffer, precise_float_parsing); 310 | else if (type == "MULTILINESTRING") 311 | result = parseWKTMultiLineString(in_buffer, precise_float_parsing); --- uncovered block 420-430 --- 418 | case GeoType::Point: 419 | if (!std::holds_alternative(object)) >> 420 | throw Exception(ErrorCodes::BAD_ARGUMENTS, "Types in parquet mismatched - expected point"); 421 | appendPointToGeoColumn(std::get(object), col); 422 | return; 423 | case GeoType::MultiPoint: 424 | if (!std::holds_alternative>(object)) >> 425 | throw Exception(ErrorCodes::BAD_ARGUMENTS, "Types in parquet mismatched - expected multi point"); 426 | appendMultiPointToGeoColumn(std::get>(object), col); 427 | return; 428 | case GeoType::LineString: 429 | if (!std::holds_alternative>(object)) >> 430 | throw Exception(ErrorCodes::BAD_ARGUMENTS, "Types in parquet mismatched - expected line string"); 431 | appendLineStringToGeoColumn(std::get>(object), col); 432 | return; --- uncovered block 466-466 --- 464 | global_discr = kMultiPointDiscriminator; 465 | else >> 466 | throw Exception(ErrorCodes::BAD_ARGUMENTS, "Unknown geometry type in WKB/WKT data"); 467 | 468 | IColumn & nested_col = variant_col.getVariantByGlobalDiscriminator(global_discr); ================================================================================ src/Processors/Formats/Impl/GeoJSONRowInputFormat.cpp ================================================================================ --- uncovered block 549-549 --- 547 | 548 | if (!isOneOf(geo_type, supported_geojson_geometry_types)) >> 549 | throw Exception(ErrorCodes::INCORRECT_DATA, "GeoJSON: unknown or invalid geometry type '{}'", geo_type); 550 | 551 | /// A 'geometries' member belongs only to a GeometryCollection; reject it on any other type. ================================================================================ src/Processors/Formats/Impl/Parquet/PrepareForWrite.cpp ================================================================================ --- uncovered block 831-838 --- 829 | for (size_t i = 0; i < variants.size(); ++i) 830 | { >> 831 | const auto & variant_name = variants[i]->getCustomName() ? variants[i]->getCustomName()->getName() : variants[i]->getName(); >> 832 | if (variant_name == WKBPointTransform::name) >> 833 | transforms[i] = std::make_shared(); >> 834 | else if (variant_name == WKBMultiPointTransform::name) >> 835 | transforms[i] = std::make_shared(); >> 836 | else if (variant_name == WKBLineStringTransform::name || variant_name == "Ring") >> 837 | transforms[i] = std::make_shared(); >> 838 | else if (variant_name == WKBPolygonTransform::name) 839 | transforms[i] = std::make_shared(); 840 | else if (variant_name == WKBMultiLineStringTransform::name) WARNING: Failed to get start time for [Print Uncovered Code] - start time and duration won't be set --- Coverage counts --- Lines : baseline 913,753/1,059,546 -> current 914,821/1,059,877 (delta +1,068 / +331) Functions : baseline 800,348/870,004 -> current 801,062/870,494 (delta +714 / +490) Branches : baseline 295,445/377,022 -> current 295,784/377,124 (delta +339 / +102)