Parsing baseline coverage from /home/ubuntu/actions-runner/_work/ClickHouse/ClickHouse/ci/tmp//base_llvm_coverage.info ... 6652 files in baseline Parsing current coverage from /home/ubuntu/actions-runner/_work/ClickHouse/ClickHouse/ci/tmp//llvm_coverage.info ... 6652 files in current Parsing second baseline coverage from /home/ubuntu/actions-runner/_work/ClickHouse/ClickHouse/ci/tmp//base_llvm_coverage_2.info ... 6651 files in second baseline cross-validation enabled: requiring uncovered in both master baselines (145,322 candidate lines / 92,368 functions in B2) Overall coverage delta (current vs master baseline): Lines : -0.0378 pp (84.1575% -> 84.1197%, -346 covered) Functions: -0.0062 pp (90.4673% -> 90.4611%, -61 covered) Newly covered: 458 line(s), 14 function(s) across 133 file(s) All 133 file(s) with newly-covered code, ranked by line count: src/Common/QueryFuzzer.cpp: 66 line(s) src/Storages/WindowView/StorageWindowView.cpp: 22 line(s), 1 function(s) src/Storages/MergeTree/ReplicatedMergeTreeSink.cpp: 17 line(s), 1 function(s) src/Storages/StorageReplicatedMergeTree.cpp: 17 line(s) src/AggregateFunctions/AggregateFunctionWindowFunnel.cpp: 11 line(s), 6 function(s) src/Functions/FunctionsNumericIndexedVector.h: 10 line(s) src/IO/S3/copyS3File.cpp: 10 line(s) src/Storages/MergeTree/LeaderElection.h: 9 line(s) src/AggregateFunctions/AggregateFunctionQuantileInterpolatedWeighted.cpp: 8 line(s) src/Databases/DatabaseMetadataDiskSettings.cpp: 8 line(s) src/Storages/MergeTree/DataPartStorageOnDiskBase.cpp: 8 line(s) src/Storages/ObjectStorageQueue/ObjectStorageQueueSource.cpp: 8 line(s) src/AggregateFunctions/AggregateFunctionSumMap.cpp: 7 line(s), 1 function(s) src/AggregateFunctions/AggregateFunctionQuantileDD.cpp: 6 line(s) src/Functions/FunctionGenerateRandomStructure.cpp: 6 line(s) src/Functions/printf.cpp: 6 line(s) src/Functions/s2GetNeighbors.cpp: 6 line(s) src/Functions/transform.cpp: 6 line(s) src/Storages/MutationCommands.cpp: 6 line(s) src/DataTypes/getLeastSupertype.cpp: 5 line(s) src/Functions/FunctionDateOrDateTimeAddInterval.h: 5 line(s) src/Functions/reinterpretAs.cpp: 5 line(s) src/Interpreters/Aggregator.cpp: 5 line(s) base/base/getMemoryAmount.cpp: 4 line(s) src/AggregateFunctions/AggregateFunctionLargestTriangleThreeBuckets.cpp: 4 line(s) src/Backups/BackupFileInfo.cpp: 4 line(s) src/Disks/IO/ReadBufferFromRemoteFSGather.cpp: 4 line(s) src/Functions/FunctionsCodingIP.cpp: 4 line(s) src/Functions/FunctionsExternalDictionaries.h: 4 line(s) src/Functions/UserDefined/UserDefinedExecutableFunctionFactory.cpp: 4 line(s) src/Functions/array/arrayTranspose.cpp: 4 line(s) src/Functions/castOrDefault.cpp: 4 line(s) src/Functions/geoToS2.cpp: 4 line(s) src/Functions/h3HexAreaKm2.cpp: 4 line(s) src/Interpreters/BloomFilterHash.h: 4 line(s) src/Interpreters/InterpreterSelectQuery.cpp: 4 line(s) src/Storages/MergeTree/MergeTreeData.cpp: 4 line(s) src/Storages/ObjectStorageQueue/ObjectStorageQueueIFileMetadata.cpp: 4 line(s) src/AggregateFunctions/AggregateFunctionGroupArrayIntersect.cpp: 3 line(s) src/Common/ProgressIndication.cpp: 3 line(s) src/Common/threadPoolCallbackRunner.h: 3 line(s) src/Coordination/KeeperDispatcher.cpp: 3 line(s) src/Databases/DatabaseReplicatedWorker.cpp: 3 line(s) src/Functions/FunctionsBitmap.h: 3 line(s) src/Functions/FunctionsStringHash.h: 3 line(s) src/Functions/TimeSeries/timeSeriesRange.cpp: 3 line(s) src/Functions/array/arraySlice.cpp: 3 line(s) src/Functions/bar.cpp: 3 line(s) src/Functions/toFixedString.h: 3 line(s) src/Interpreters/DDLWorker.cpp: 3 line(s) src/Storages/Kafka/KafkaConsumer2.cpp: 3 line(s) src/AggregateFunctions/AggregateFunctionDeltaSumTimestamp.cpp: 2 line(s) src/AggregateFunctions/AggregateFunctionExponentialMovingAverage.cpp: 2 line(s) src/AggregateFunctions/AggregateFunctionGroupArrayMoving.cpp: 2 line(s) src/AggregateFunctions/AggregateFunctionQuantileBFloat16.cpp: 2 line(s) src/AggregateFunctions/AggregateFunctionStatisticsSimple.h: 2 line(s) src/Common/ZooKeeper/ZooKeeperImpl.cpp: 2 line(s) src/Databases/DatabaseReplicated.cpp: 2 line(s) src/Functions/FunctionStringReplace.h: 2 line(s) src/Functions/FunctionsConsistentHashing.h: 2 line(s) src/Functions/FunctionsEmbeddedDictionaries.h: 2 line(s) src/Functions/FunctionsStringSearchToString.h: 2 line(s) src/Functions/date_trunc.cpp: 2 line(s) src/Functions/obfuscateQuery.cpp: 2 line(s) src/Functions/parseDateTime.cpp: 2 line(s) src/Interpreters/ClusterProxy/executeQuery.cpp: 2 line(s) src/Interpreters/DistributedQueryStatusSource.cpp: 2 line(s) src/Processors/Formats/Impl/Parquet/ReadManager.cpp: 2 line(s) src/Processors/QueryPlan/Optimizations/optimizeReadInOrder.cpp: 2 line(s) src/Processors/Transforms/WindowTransform.cpp: 2 line(s) src/Storages/StorageMergeTree.cpp: 2 line(s) src/Functions/toModifiedJulianDay.cpp: 1 line(s), 2 function(s) src/Columns/ColumnBLOB.h: 1 line(s), 1 function(s) src/Functions/today.cpp: 1 line(s), 1 function(s) src/Interpreters/InterpreterSelectWithUnionQuery.h: 1 line(s), 1 function(s) base/base/cgroupsv2.cpp: 1 line(s) programs/server/Server.cpp: 1 line(s) src/AggregateFunctions/AggregateFunctionQuantileBFloat16Weighted.cpp: 1 line(s) src/AggregateFunctions/AggregateFunctionQuantileExactHigh.cpp: 1 line(s) src/AggregateFunctions/AggregateFunctionQuantileTDigestWeighted.cpp: 1 line(s) src/Columns/ColumnVariant.cpp: 1 line(s) src/Columns/ColumnVector.cpp: 1 line(s) src/Common/Config/ConfigReloader.cpp: 1 line(s) src/Common/Elf.cpp: 1 line(s) src/Common/FailPoint.cpp: 1 line(s) src/Common/SystemLogBase.cpp: 1 line(s) src/Coordination/KeeperServer.cpp: 1 line(s) src/Core/DecimalComparison.h: 1 line(s) src/DataTypes/NestedUtils.cpp: 1 line(s) src/Disks/DiskObjectStorage/MetadataStorages/MetadataOperationsHolder.cpp: 1 line(s) src/Disks/DiskObjectStorage/ObjectStorages/Local/LocalObjectStorage.cpp: 1 line(s) src/Functions/DateTimeTransforms.h: 1 line(s) src/Functions/FunctionBitTestMany.h: 1 line(s) src/Functions/FunctionSQLJSON.h: 1 line(s) src/Functions/FunctionUnaryArithmetic.h: 1 line(s) src/Functions/FunctionsJSON.cpp: 1 line(s) src/Functions/JSONPaths.cpp: 1 line(s) src/Functions/array/arrayConcat.cpp: 1 line(s) src/Functions/array/arrayReduce.cpp: 1 line(s) src/Functions/fromModifiedJulianDay.cpp: 1 line(s) src/Functions/readWkb.cpp: 1 line(s) src/Functions/svg.cpp: 1 line(s) src/IO/AzureBlobStorage/PocoHTTPClient.cpp: 1 line(s) src/IO/S3/PocoHTTPClient.cpp: 1 line(s) src/IO/copyData.cpp: 1 line(s) src/Interpreters/ClusterDiscovery.cpp: 1 line(s) src/Interpreters/FileCache/FileCache.cpp: 1 line(s) src/Interpreters/FileCache/FileSegment.cpp: 1 line(s) src/Interpreters/IJoin.h: 1 line(s) src/Interpreters/InterpreterCreateQuery.cpp: 1 line(s) src/Interpreters/JoinExpressionActions.cpp: 1 line(s) src/Interpreters/JoinOperator.cpp: 1 line(s) src/Interpreters/MergeTreeTransaction/VersionInfo.cpp: 1 line(s) src/Interpreters/convertFieldToType.cpp: 1 line(s) src/Parsers/ExpressionListParsers.cpp: 1 line(s) src/Planner/PlannerJoinTree.cpp: 1 line(s) src/Processors/Executors/PipelineExecutor.cpp: 1 line(s) src/Processors/Formats/Impl/Parquet/Decoding.cpp: 1 line(s) src/Processors/Merges/Algorithms/SummingSortedAlgorithm.cpp: 1 line(s) src/Processors/QueryPlan/AggregatingStep.cpp: 1 line(s) src/Server/HTTP/ReadHeaders.cpp: 1 line(s) src/Storages/MergeTree/DataPartsExchange.cpp: 1 line(s) src/Storages/MergeTree/KeyCondition.cpp: 1 line(s) src/Storages/MergeTree/MergeTreeDataPartWide.cpp: 1 line(s) src/Storages/MergeTree/RPNBuilder.cpp: 1 line(s) src/Storages/MergeTree/ReplicatedMergeTreeAltersSequence.cpp: 1 line(s) src/Storages/MergeTree/ReplicatedMergeTreeQueue.cpp: 1 line(s) src/Storages/ObjectStorage/DataLakes/Iceberg/ComplexTypeSchemaProcessorFunctions.cpp: 1 line(s) src/Storages/ObjectStorageQueue/ObjectStorageQueueMetadata.cpp: 1 line(s) src/Storages/Statistics/Statistics.cpp: 1 line(s) src/Storages/System/StorageSystemTables.cpp: 1 line(s) src/Storages/VirtualColumnUtils.cpp: 1 line(s) src/TableFunctions/TableFunctionLoop.cpp: 1 line(s) Newly covered code (with context): ================================================================================ src/Common/QueryFuzzer.cpp ================================================================================ --- newly covered block 252-255 --- 250 | return String(uuid_values[fuzz_rand() % std::size(uuid_values)]); 251 | } >> 252 | case 7: { 253 | /// IPv4 boundary values — stress network address parsing and arithmetic >> 254 | static constexpr const char * ipv4_values[] = {"0.0.0.0", "127.0.0.1", "192.168.0.1", "255.255.255.255", "10.0.0.1"}; >> 255 | return String(ipv4_values[fuzz_rand() % std::size(ipv4_values)]); 256 | } 257 | case 8: { --- newly covered block 329-329 --- 327 | // Change type sometimes, but not often, because it mostly leads to 328 | // boring errors. >> 329 | type_index = fuzz_rand() % 10; 330 | } 331 | return getRandomField(type_index); --- newly covered block 336-338 --- 334 | if (type == Field::Types::String) 335 | { >> 336 | auto & str = field.safeGet(); >> 337 | const UInt64 action = fuzz_rand() % 15; >> 338 | switch (action) 339 | { 340 | case 0: --- newly covered block 366-373 --- 364 | str = "\xF0\x28\x8C\xBC"; 365 | break; >> 366 | case 6: >> 367 | case 7: 368 | /// For LIKE strings >> 369 | if (str.size() < 128) 370 | { >> 371 | for (auto & c : str) 372 | { >> 373 | if ((c == '_' || c == '%') && ((fuzz_rand() % 2) == 0)) 374 | { 375 | c = (c == '_') ? '%' : '_'; --- newly covered block 379-379 --- 377 | } 378 | } >> 379 | break; 380 | case 8: 381 | /// Null byte as full string — stresses functions that use strlen internally --- newly covered block 587-587 --- 585 | if (!list->children.empty() && fuzz_rand() % 20 == 0) 586 | { >> 587 | std::shuffle(list->children.begin(), list->children.end(), fuzz_rand); 588 | } 589 | --- newly covered block 1992-2046 --- 1990 | return; 1991 | >> 1992 | auto * fn = typeid_cast(table_function.get()); >> 1993 | if (!fn) 1994 | return; 1995 | >> 1996 | static const std::vector> swapTableFuncs = { 1997 | /// Sequence generators (count → rows) >> 1998 | {"numbers", "numbers_mt", "zeros", "zeros_mt", "generateSeries", "generate_series", "primes"}, 1999 | /// File-like sources (path/url, format, structure) >> 2000 | {"file", "url"}, 2001 | /// Cluster variants of file-like sources >> 2002 | {"fileCluster", "urlCluster"}, 2003 | /// Object storage (url, access_key, secret_key, format, structure) >> 2004 | {"s3", "gcs", "cosn", "oss"}, 2005 | /// Object storage cluster variants >> 2006 | {"s3Cluster", "azureBlobStorageCluster"}, 2007 | /// Data lake table functions >> 2008 | {"iceberg", "icebergS3", "deltaLake", "deltaLakeS3", "hudi", "paimon", "paimonS3"}, 2009 | /// Data lake Azure variants >> 2010 | {"icebergAzure", "deltaLakeAzure", "paimonAzure"}, 2011 | /// Data lake HDFS variants >> 2012 | {"icebergHDFS", "paimonHDFS"}, 2013 | /// Data lake local variants >> 2014 | {"icebergLocal", "deltaLakeLocal", "paimonLocal"}, 2015 | /// Data lake cluster variants >> 2016 | {"icebergCluster", "icebergS3Cluster", "deltaLakeCluster", "deltaLakeS3Cluster", "hudiCluster", "paimonCluster", "paimonS3Cluster"}, 2017 | /// Data lake Azure cluster variants >> 2018 | {"icebergAzureCluster", "deltaLakeAzureCluster", "paimonAzureCluster"}, 2019 | /// Data lake HDFS cluster variants >> 2020 | {"icebergHDFSCluster", "paimonHDFSCluster"}, 2021 | /// MergeTree introspection >> 2022 | {"mergeTreeIndex", "mergeTreeAnalyzeIndexes", "mergeTreeProjection", "mergeTreeTextIndex"}, 2023 | /// External relational databases (host, port, db, table, user, password) >> 2024 | {"mysql", "postgresql"}, 2025 | /// External databases with connection-style args >> 2026 | {"sqlite", "mongodb", "redis"}, 2027 | /// Remote ClickHouse clusters >> 2028 | {"remote", "remoteSecure"}, 2029 | /// Named cluster table functions >> 2030 | {"cluster", "clusterAllReplicas"}, 2031 | /// XDBC connectors >> 2032 | {"jdbc", "odbc"}, 2033 | /// Fuzzer generators >> 2034 | {"fuzzQuery", "fuzzJSON"}, 2035 | /// Prometheus query variants >> 2036 | {"prometheusQuery", "prometheusQueryRange"}, 2037 | /// View variants >> 2038 | {"view", "viewIfPermitted"}, 2039 | }; 2040 | >> 2041 | for (const auto & group : swapTableFuncs) 2042 | { >> 2043 | if (group.contains(fn->name)) 2044 | { >> 2045 | fn->name = pickRandomly(fuzz_rand, group); >> 2046 | return; 2047 | } 2048 | } --- newly covered block 2511-2511 --- 2509 | else 2510 | { >> 2511 | std::copy_if(column_like.begin(), column_like.end(), std::back_inserter(colids), identifier_lambda); 2512 | } 2513 | if (!colids.empty()) --- newly covered block 2531-2540 --- 2529 | if (nprob == 0) 2530 | { >> 2531 | next_condition = makeASTFunction(fuzz_rand() % 2 == 0 ? "isNull" : "isNotNull", expression_1); 2532 | } 2533 | else if (nprob == 1 && !table_like.empty() && current_ast_depth < 80) 2534 | { 2535 | /// col IN/NOT IN/globalIn/globalNotIn (subquery), or EXISTS (subquery) >> 2536 | static const Strings subquery_variants = {"in", "notIn", "globalIn", "globalNotIn", "exists"}; >> 2537 | for (size_t att = 0; att < 10; ++att) 2538 | { >> 2539 | const auto & entry = table_like[fuzz_rand() % table_like.size()]; >> 2540 | if (typeid_cast(entry.second.get())) 2541 | { 2542 | const String & variant = subquery_variants[fuzz_rand() % subquery_variants.size()]; --- newly covered block 2780-2780 --- 2778 | else 2779 | { >> 2780 | switch (table_join->kind) 2781 | { 2782 | case JoinKind::Inner: --- newly covered block 2792-2794 --- 2790 | table_join->strictness = right_strictness_values[fuzz_rand() % right_strictness_values.size()]; 2791 | break; >> 2792 | case JoinKind::Full: >> 2793 | table_join->strictness = fuzz_rand() % 2 == 0 ? JoinStrictness::Unspecified : JoinStrictness::All; >> 2794 | break; 2795 | default: 2796 | break; --- newly covered block 2811-2813 --- 2809 | return walias ? walias->tryGetAlias() : ""; 2810 | } >> 2811 | else if (const auto * sub = dynamic_cast(input.get())) 2812 | { >> 2813 | return sub->tryGetAlias(); 2814 | } 2815 | else --- newly covered block 2858-2872 --- 2856 | } 2857 | } >> 2858 | else if (dynamic_cast(input_table.get())) 2859 | { >> 2860 | ASTPtr child = input_table->clone(); >> 2861 | table_exp = make_intrusive(); >> 2862 | auto * ntexp = typeid_cast(table_exp.get()); 2863 | >> 2864 | child->setAlias(next_alias); >> 2865 | ntexp->children.push_back(child); >> 2866 | if (typeid_cast(input_table.get())) 2867 | { 2868 | ntexp->subquery = ntexp->children.back(); 2869 | } >> 2870 | else if (typeid_cast(input_table.get())) 2871 | { >> 2872 | ntexp->table_function = ntexp->children.back(); 2873 | } 2874 | else --- newly covered block 2921-2923 --- 2919 | { 2920 | /// Swap sides >> 2921 | auto expression_e = expression_1; >> 2922 | expression_1 = expression_2; >> 2923 | expression_2 = expression_e; 2924 | } 2925 | /// Run mostly equi-joins ================================================================================ src/Storages/WindowView/StorageWindowView.cpp ================================================================================ --- newly covered block 304-304 --- 302 | UInt32 addTime(UInt32 time_sec, IntervalKind::Kind kind, Int64 num_units, const DateLUTImpl & time_zone) 303 | { >> 304 | switch (kind) 305 | { 306 | case IntervalKind::Kind::Nanosecond: --- newly covered block 311-314 --- 309 | throw Exception(ErrorCodes::SYNTAX_ERROR, "Fractional seconds are not supported by windows yet"); 310 | #define CASE_WINDOW_KIND_ADD_TIME(KIND) \ >> 311 | case IntervalKind::Kind::KIND: { \ >> 312 | return AddTime::execute(time_sec, num_units, time_zone); \ 313 | } >> 314 | CASE_WINDOW_KIND_ADD_TIME(Second) 315 | CASE_WINDOW_KIND_ADD_TIME(Minute) 316 | CASE_WINDOW_KIND_ADD_TIME(Hour) --- newly covered block 326-327 --- 324 | CASE_WINDOW_KIND_ADD_DATE(Month) 325 | CASE_WINDOW_KIND_ADD_DATE(Quarter) >> 326 | CASE_WINDOW_KIND_ADD_DATE(Year) >> 327 | #undef CASE_WINDOW_KIND_ADD_DATE 328 | } 329 | } --- newly covered block 1109-1133 --- 1107 | while (next_fire_signal <= timestamp_now) 1108 | { >> 1109 | try 1110 | { >> 1111 | if (max_watermark >= timestamp_start) 1112 | fire(next_fire_signal); 1113 | } >> 1114 | catch (...) 1115 | { 1116 | tryLogCurrentException(__PRETTY_FUNCTION__); 1117 | } >> 1118 | max_fired_watermark = next_fire_signal; >> 1119 | auto slide_interval = addTime(0, slide_kind, slide_num_units, *time_zone); 1120 | /// Convert DayNum into seconds when the slide interval is larger than Day >> 1121 | if (slide_kind > IntervalKind::Kind::Day) 1122 | slide_interval *= 86400; >> 1123 | next_fire_signal += slide_interval; 1124 | >> 1125 | LOG_TRACE( >> 1126 | log, >> 1127 | "Start: {}, now: {}, next fire signal: {}, max watermark: {}, max fired watermark: {}, slide interval: {}", >> 1128 | timestamp_start, >> 1129 | timestamp_now, >> 1130 | next_fire_signal, >> 1131 | max_watermark, >> 1132 | max_fired_watermark, >> 1133 | slide_interval); 1134 | } 1135 | ================================================================================ src/Storages/MergeTree/ReplicatedMergeTreeSink.cpp ================================================================================ --- newly covered block 1064-1084 --- 1062 | { 1063 | /// Block with the same id have just appeared in table (or other replica), rollback the insertion. >> 1064 | LOG_INFO(log, "Block with ID {} already exists (it was just appeared) for part {}. Ignore it.", >> 1065 | failed_op_path, part->name); 1066 | >> 1067 | transaction.rollbackPartsToTemporaryState(); >> 1068 | part->is_temp = true; >> 1069 | part->setName(initial_part_name); >> 1070 | part->renameTo(temporary_part_relative_path, false); 1071 | >> 1072 | auto conflicted_hash_it = std::find_if( >> 1073 | deduplication_hashes.begin(), >> 1074 | deduplication_hashes.end(), >> 1075 | [&](const DeduplicationHash & hash) 1076 | { >> 1077 | return hash.getBlockId() == failed_op_path.filename().string(); >> 1078 | }); >> 1079 | chassert(conflicted_hash_it != deduplication_hashes.end()); >> 1080 | retry_context.conflict_deduplication_hashes.push_back(*conflicted_hash_it); 1081 | >> 1082 | LOG_TRACE(log, "conflict when committing, the conflict block ids are {}", >> 1083 | fmt::join(getDeduplicationBlockIds(retry_context.conflict_deduplication_hashes), ", ")); >> 1084 | return CommitRetryContext::RESOLVE_CONFLICTS; 1085 | } 1086 | ================================================================================ src/Storages/StorageReplicatedMergeTree.cpp ================================================================================ --- newly covered block 3621-3623 --- 3619 | else if (info.parsed_entry->type == LogEntry::GET_PART) 3620 | { >> 3621 | String maybe_covering_drop_range = drop_range_set.getContainingPart(info.parsed_entry->new_part_name); >> 3622 | if (maybe_covering_drop_range.empty()) >> 3623 | get_part_set.add(info.parsed_entry->new_part_name); 3624 | } 3625 | else --- newly covered block 3749-3750 --- 3747 | /// if there are GET_PART and log entry of other type with the same new_part_name. 3748 | /// But it's a bit harder to implement, because it requires full-fledged virtual_parts set. >> 3749 | LOG_TRACE(log, "{} {}: GET_PART for it is already created", log_msg_context, part_name); >> 3750 | return true; 3751 | } 3752 | --- newly covered block 3842-3842 --- 3840 | 3841 | if (should_ignore_log_entry(created_get_parts, part_name, fmt::format("Not copying {} {}", entry_name, entry_type))) >> 3842 | continue; 3843 | 3844 | if (entry_info.parsed_entry->type == LogEntry::GET_PART) --- newly covered block 5288-5291 --- 5286 | break; 5287 | } >> 5288 | if (code == Coordination::Error::ZNONODE) 5289 | { 5290 | /// The quorum has already been achieved. >> 5291 | break; 5292 | } 5293 | if (code == Coordination::Error::ZBADVERSION) --- newly covered block 7933-7933 --- 7931 | /// Skip dead replicas. 7932 | if (is_active.error == Coordination::Error::ZNONODE) >> 7933 | continue; 7934 | else if (is_active.error != Coordination::Error::ZOK) 7935 | throw Coordination::Exception::fromPath(is_active.error, is_active_path); --- newly covered block 7957-7957 --- 7955 | } 7956 | >> 7957 | max_replicas_unprocessed_insert_time = std::max(replica_time, max_replicas_unprocessed_insert_time); 7958 | } 7959 | --- newly covered block 7964-7966 --- 7962 | else 7963 | { >> 7964 | max_replicas_unprocessed_insert_time = std::min(current_time, max_replicas_unprocessed_insert_time); >> 7965 | time_t min_replicas_delay = current_time - max_replicas_unprocessed_insert_time; >> 7966 | if (out_absolute_delay > min_replicas_delay) 7967 | out_relative_delay = out_absolute_delay - min_replicas_delay; 7968 | } --- newly covered block 8337-8346 --- 8335 | break; 8336 | } >> 8337 | if (rc == Coordination::Error::ZBADVERSION) 8338 | { 8339 | /// Cannot retry automatically, because some zookeeper ops were lost on the first attempt. Will retry on DDLWorker-level. >> 8340 | if (query_context->getZooKeeperMetadataTransaction()) 8341 | throw Exception( 8342 | ErrorCodes::CANNOT_ASSIGN_ALTER, 8343 | "Cannot execute alter, because mutations version was suddenly changed due " 8344 | "to concurrent alter"); >> 8345 | LOG_TRACE(log, "Version conflict when trying to create a mutation node, retrying..."); >> 8346 | continue; 8347 | } 8348 | throw Coordination::Exception::fromMessage(rc, "Unable to create a mutation znode"); ================================================================================ src/AggregateFunctions/AggregateFunctionWindowFunnel.cpp ================================================================================ --- newly covered block 202-202 --- 200 | { 201 | if (other.events_list.empty()) >> 202 | return; 203 | 204 | const auto current_size = events_list.size(); --- newly covered block 246-261 --- 244 | void deserialize(ReadBuffer & buf) 245 | { >> 246 | readBinary(sorted, buf); 247 | >> 248 | size_t events_size; >> 249 | readBinary(events_size, buf); 250 | >> 251 | if (events_size > 100'000'000) /// Arbitrary limit to prevent excessive memory allocation 252 | throw Exception(ErrorCodes::TOO_LARGE_ARRAY_SIZE, "Too large size of the state of windowFunnel"); 253 | >> 254 | events_list.clear(); >> 255 | events_list.reserve(events_size); 256 | >> 257 | T timestamp; >> 258 | UInt8 event_type; >> 259 | UInt64 unique_id = 0; 260 | >> 261 | for (size_t i = 0; i < events_size; ++i) 262 | { 263 | readBinary(timestamp, buf); ================================================================================ src/Functions/FunctionsNumericIndexedVector.h ================================================================================ --- newly covered block 146-150 --- 144 | const auto * type0 = typeid_cast(arguments[0].get()); 145 | if (!(type0 && type0->getFunctionName() == NameAggregateFunctionGroupNumericIndexedVector::name)) >> 146 | throw Exception( >> 147 | ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, >> 148 | "First argument for function {} must be a NumericIndexedVector but it has type {}", >> 149 | getName(), >> 150 | arguments[0]->getName()); 151 | 152 | const auto * type1 = typeid_cast(arguments[1].get()); --- newly covered block 815-819 --- 813 | const DataTypeAggregateFunction * type = typeid_cast(arguments[0].get()); 814 | if (!(type && type->getFunctionName() == NameAggregateFunctionGroupNumericIndexedVector::name)) >> 815 | throw Exception( >> 816 | ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, >> 817 | "First argument for function {} must be a NumericIndexedVector but it has type {}.", >> 818 | getName(), >> 819 | arguments[0]->getName()); 820 | 821 | DataTypes tmp; ================================================================================ src/IO/S3/copyS3File.cpp ================================================================================ --- newly covered block 513-513 --- 511 | } 512 | >> 513 | if (outcome.GetError().GetExceptionName() == "EntityTooLarge" || outcome.GetError().GetExceptionName() == "InvalidRequest") 514 | { 515 | // Can't come here with MinIO, MinIO allows single part upload for large objects. --- newly covered block 527-527 --- 525 | } 526 | >> 527 | if ((outcome.GetError().GetErrorType() == Aws::S3::S3Errors::NO_SUCH_KEY) && (retries < max_retries)) 528 | { 529 | /// For unknown reason, at least MinIO can respond with NO_SUCH_KEY for put requests --- newly covered block 538-545 --- 536 | continue; /// will retry 537 | } >> 538 | ProfileEvents::increment(ProfileEvents::WriteBufferFromS3RequestsErrors, 1); >> 539 | throw S3Exception( >> 540 | outcome.GetError().GetErrorType(), >> 541 | "Message: {}, Key: {}, Bucket: {}, Object size: {}", >> 542 | outcome.GetError().GetMessage(), >> 543 | dest_key, >> 544 | dest_bucket, >> 545 | request.GetContentLength()); 546 | } 547 | } ================================================================================ src/Storages/MergeTree/LeaderElection.h ================================================================================ --- newly covered block 58-61 --- 56 | 57 | /// Ensure that current leader supports multi-leader mode and make it persistent >> 58 | auto current_leader = fs::path(path) / potential_leaders.front(); >> 59 | Coordination::Stat leader_stat; >> 60 | String identifier; >> 61 | if (!zookeeper.tryGet(current_leader, identifier, &leader_stat)) 62 | { 63 | LOG_INFO(log, "LeaderElection: leader suddenly changed, will retry"); --- newly covered block 67-74 --- 65 | } 66 | >> 67 | if (!identifier.ends_with(suffix)) 68 | throw Poco::Exception(fmt::format("Found leader replica ({}) with too old version (< 20.6). Stop it before upgrading", identifier)); 69 | 70 | /// Version does not matter, just check that it still exists. 71 | /// May fail with ZNONODE >> 72 | ops.emplace_back(makeCheckRequest(current_leader, leader_stat.version)); 73 | /// May fail with ZNODEEXISTS >> 74 | ops.emplace_back(makeCreateRequest(fs::path(path) / persistent_multiple_leaders, persistent_identifier, zkutil::CreateMode::Persistent)); 75 | } 76 | --- newly covered block 84-87 --- 82 | LOG_INFO(log, "LeaderElection: leader suddenly changed or new node appeared, will retry"); 83 | else >> 84 | KeeperMultiException::check(code, ops, res); 85 | } 86 | >> 87 | throw Poco::Exception("Cannot check that no old leaders exist"); 88 | } 89 | ================================================================================ src/AggregateFunctions/AggregateFunctionQuantileInterpolatedWeighted.cpp ================================================================================ --- newly covered block 346-355 --- 344 | if (which.idx == TypeIndex::Decimal64) return std::make_shared>(argument_types, params); 345 | if (which.idx == TypeIndex::Decimal128) return std::make_shared>(argument_types, params); >> 346 | if (which.idx == TypeIndex::Decimal256) return std::make_shared>(argument_types, params); >> 347 | if (which.idx == TypeIndex::DateTime64) return std::make_shared>(argument_types, params); 348 | >> 349 | if (which.idx == TypeIndex::Int128) return std::make_shared>(argument_types, params); >> 350 | if (which.idx == TypeIndex::UInt128) return std::make_shared>(argument_types, params); >> 351 | if (which.idx == TypeIndex::Int256) return std::make_shared>(argument_types, params); >> 352 | if (which.idx == TypeIndex::UInt256) return std::make_shared>(argument_types, params); 353 | >> 354 | throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "Illegal type {} of argument for aggregate function {}", >> 355 | argument_type->getName(), name); 356 | } 357 | ================================================================================ src/Databases/DatabaseMetadataDiskSettings.cpp ================================================================================ --- newly covered block 41-46 --- 39 | } 40 | >> 41 | ASTPtr value_as_custom_ast = nullptr; >> 42 | CustomType custom; >> 43 | if (value->tryGet(custom) && 0 == strcmp(custom.getTypeName(), "AST")) 44 | value_as_custom_ast = dynamic_cast(custom.getImpl()).ast; 45 | >> 46 | if (value_as_custom_ast && isDiskFunction(value_as_custom_ast)) 47 | { 48 | auto disk_name = DiskFromAST::createCustomDisk(value_as_custom_ast, context, is_loading_from_existing_metadata); --- newly covered block 53-58 --- 51 | else 52 | { >> 53 | DiskFromAST::ensureDiskIsNotCustom(value->safeGet(), context); 54 | } >> 55 | [[maybe_unused]] auto disk = context->getDisk(value->safeGet()); >> 56 | chassert(disk); 57 | >> 58 | applyChanges(changes); 59 | } 60 | ================================================================================ src/Storages/MergeTree/DataPartStorageOnDiskBase.cpp ================================================================================ --- newly covered block 723-731 --- 721 | if (disk->existsDirectory(to)) 722 | { >> 723 | LOG_WARNING(log, "Directory {} (to which part must be renamed before removing) already exists. " >> 724 | "Most likely this is due to unclean restart or race condition. Removing it.", fullPath(disk, to)); >> 725 | try 726 | { >> 727 | can_remove_description.emplace(can_remove_callback()); >> 728 | disk->removeSharedRecursive( >> 729 | fs::path(to) / "", !can_remove_description->can_remove_anything, can_remove_description->files_not_to_remove); 730 | } >> 731 | catch (const fs::filesystem_error & e) 732 | { 733 | if (e.code() == std::errc::no_such_file_or_directory) --- newly covered block 740-740 --- 738 | throw; 739 | } >> 740 | catch (...) 741 | { 742 | LOG_ERROR( ================================================================================ src/Storages/ObjectStorageQueue/ObjectStorageQueueSource.cpp ================================================================================ --- newly covered block 1035-1047 --- 1033 | if (isCancelled()) 1034 | { >> 1035 | if (reader) 1036 | reader->cancel(); 1037 | 1038 | /// Are there any started, but not finished files? >> 1039 | if (processed_files.empty() || processed_files.back().state != FileState::Processing) 1040 | { >> 1041 | LOG_DEBUG( >> 1042 | log, "Reader was cancelled " >> 1043 | "(processed files: {}, last processed file state: {})", >> 1044 | processed_files.size(), >> 1045 | processed_files.empty() ? "None" : magic_enum::enum_name(processed_files.back().state)); 1046 | /// No unfinished files, just stop processing. >> 1047 | break; 1048 | } 1049 | ================================================================================ src/AggregateFunctions/AggregateFunctionSumMap.cpp ================================================================================ --- newly covered block 745-745 --- 743 | const auto * tuple_type = checkAndGetDataType(arguments[0].get()); 744 | if (!tuple_type) >> 745 | throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "When function {} gets one argument it must be a tuple", name); 746 | 747 | const auto elems = tuple_type->getElements(); --- newly covered block 763-764 --- 761 | const auto * array_type = checkAndGetDataType(args[0].get()); 762 | if (!array_type) >> 763 | throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "Argument #1 for function {} must be an array, not {}", >> 764 | name, args[0]->getName()); 765 | 766 | DataTypePtr keys_type = array_type->getNestedType(); --- newly covered block 1066-1070 --- 1064 | factory.registerFunction("sumMapFilteredWithOverflow", {[](const std::string & name, const DataTypes & arguments, const Array & params, const Settings *) -> AggregateFunctionPtr 1065 | { >> 1066 | auto [keys_type, values_types, tuple_argument] = parseArguments(name, arguments); >> 1067 | if (tuple_argument) 1068 | return std::make_shared>(keys_type, values_types, arguments, params); >> 1069 | return std::make_shared>(keys_type, values_types, arguments, params); >> 1070 | }, {}}); 1071 | } 1072 | ================================================================================ src/AggregateFunctions/AggregateFunctionQuantileDD.cpp ================================================================================ --- newly covered block 32-32 --- 30 | { 31 | if (argument_types.empty()) >> 32 | throw Exception(ErrorCodes::TOO_FEW_ARGUMENTS_FOR_FUNCTION, "Aggregate function {} requires at least one argument", name); 33 | 34 | const DataTypePtr & argument_type = argument_types[0]; --- newly covered block 40-45 --- 38 | if (which.idx == TypeIndex::TYPE) return std::make_shared>(argument_types, params); 39 | FOR_BASIC_NUMERIC_TYPES(DISPATCH) >> 40 | #undef DISPATCH >> 41 | if (which.idx == TypeIndex::Date) return std::make_shared>(argument_types, params); >> 42 | if (which.idx == TypeIndex::DateTime) return std::make_shared>(argument_types, params); 43 | >> 44 | throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "Illegal type {} of argument for aggregate function {}", >> 45 | argument_type->getName(), name); 46 | } 47 | ================================================================================ src/Functions/FunctionGenerateRandomStructure.cpp ================================================================================ --- newly covered block 222-222 --- 220 | /// Map key supports only String and FixedString inside LowCardinality. 221 | if (rng() % 2) >> 222 | writeCString("String", buf); 223 | else 224 | writeString("FixedString(" + std::to_string(rng() % MAX_FIXEDSTRING_SIZE_WITHOUT_SUSPICIOUS + 1) + ")", buf); --- newly covered block 232-236 --- 230 | writeChar(')', buf); 231 | break; >> 232 | case TypeIndex::Enum16: >> 233 | writeCString("Enum16(", buf); >> 234 | writeEnumValues(column_name, rng, buf, INT16_MAX); >> 235 | writeChar(')', buf); >> 236 | break; 237 | default: 238 | writeString(magic_enum::enum_name(type), buf); ================================================================================ src/Functions/printf.cpp ================================================================================ --- newly covered block 487-492 --- 485 | /// Check if all arguments are used 486 | if (idx != arguments.size()) >> 487 | throw Exception( >> 488 | ErrorCodes::NUMBER_OF_ARGUMENTS_DOESNT_MATCH, >> 489 | "Number of arguments for function {} doesn't match: passed {}, but format is {}", >> 490 | getName(), >> 491 | arguments.size(), >> 492 | format); 493 | 494 | return instructions; ================================================================================ src/Functions/s2GetNeighbors.cpp ================================================================================ --- newly covered block 58-63 --- 56 | 57 | if (!WhichDataType(arg).isUInt64()) >> 58 | throw Exception( >> 59 | ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, >> 60 | "Illegal type {} of argument {} of function {}. Must be UInt64", >> 61 | arg->getName(), >> 62 | 1, >> 63 | getName()); 64 | 65 | return std::make_shared(std::make_shared()); ================================================================================ src/Functions/transform.cpp ================================================================================ --- newly covered block 864-869 --- 862 | const auto args_size = arguments.size(); 863 | if (args_size != 3 && args_size != 4) >> 864 | throw Exception( >> 865 | ErrorCodes::NUMBER_OF_ARGUMENTS_DOESNT_MATCH, >> 866 | "Number of arguments for function {} doesn't match: " >> 867 | "passed {}, should be 3 or 4", >> 868 | getName(), >> 869 | args_size); 870 | 871 | const DataTypePtr & type_x = arguments[0]; ================================================================================ src/Storages/MutationCommands.cpp ================================================================================ --- newly covered block 162-168 --- 160 | } 161 | >> 162 | const bool metadata_only_modification >> 163 | = ast_col_decl.getDefaultExpression() != nullptr >> 164 | || ast_col_decl.getComment() != nullptr >> 165 | || ast_col_decl.getCodec() != nullptr >> 166 | || ast_col_decl.getTTL() != nullptr; 167 | >> 168 | if (!metadata_only_modification) 169 | throw Exception(ErrorCodes::LOGICAL_ERROR, "MODIFY COLUMN mutation command doesn't specify type: {}", command.formatForErrorMessage()); 170 | } ================================================================================ src/DataTypes/getLeastSupertype.cpp ================================================================================ --- newly covered block 183-187 --- 181 | if (min_bit_width_of_integer <= 256) 182 | return std::make_shared(); >> 183 | return throwOrReturn( >> 184 | types, >> 185 | " because some of them are signed integers and some are unsigned integers," >> 186 | " but there is no signed integer type, that can exactly represent all required unsigned integer values", >> 187 | ErrorCodes::NO_COMMON_TYPE); 188 | } 189 | ================================================================================ src/Functions/FunctionDateOrDateTimeAddInterval.h ================================================================================ --- newly covered block 995-999 --- 993 | return DateTimeAddIntervalImpl::execute( 994 | Transform{}, arguments, result_type, 3, input_rows_count); >> 995 | throw Exception( >> 996 | ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, >> 997 | "Illegal type {} of first argument of function {}", >> 998 | arguments[0].type->getName(), >> 999 | getName()); 1000 | } 1001 | }; ================================================================================ src/Functions/reinterpretAs.cpp ================================================================================ --- newly covered block 67-71 --- 65 | const auto * type_col = checkAndGetColumnConst(column.get()); 66 | if (!type_col) >> 67 | throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, >> 68 | "Second argument to {} must be a constant string describing type." >> 69 | " Instead there is non-constant column of type {}", >> 70 | getName(), >> 71 | arguments.back().type->getName()); 72 | 73 | DataTypePtr to_type = DataTypeFactory::instance().get(type_col->getValue()); ================================================================================ src/Interpreters/Aggregator.cpp ================================================================================ --- newly covered block 3055-3055 --- 3053 | } 3054 | } >> 3055 | else if (res->without_key) 3056 | { 3057 | mergeDataNoMoreKeysImpl( --- newly covered block 3065-3068 --- 3063 | else 3064 | { >> 3065 | mergeDataOnlyExistingKeysImpl( >> 3066 | getDataVariant(*res).data, >> 3067 | getDataVariant(current).data, >> 3068 | res->aggregates_pool); 3069 | } 3070 | ================================================================================ base/base/getMemoryAmount.cpp ================================================================================ --- newly covered block 22-28 --- 20 | return {}; 21 | >> 22 | std::filesystem::path current_cgroup = cgroupV2PathOfProcess(); >> 23 | if (current_cgroup.empty()) 24 | return {}; 25 | 26 | /// Open the bottom-most nested memory limit setting file. If there is no such file at the current 27 | /// level, try again at the parent level as memory settings are inherited. >> 28 | while (current_cgroup != default_cgroups_mount.parent_path()) 29 | { 30 | std::ifstream setting_file(current_cgroup / "memory.max"); --- newly covered block 41-41 --- 39 | } 40 | >> 41 | return {}; 42 | #else 43 | return {}; ================================================================================ src/AggregateFunctions/AggregateFunctionLargestTriangleThreeBuckets.cpp ================================================================================ --- newly covered block 336-339 --- 334 | if (!(isNumber(argument_types[0]) || isDateOrDate32(argument_types[0]) || isDateTime(argument_types[0]) 335 | || isDateTime64(argument_types[0]))) >> 336 | throw Exception( >> 337 | ErrorCodes::NOT_IMPLEMENTED, >> 338 | "Aggregate function {} only supports Date, Date32, DateTime, DateTime64 and Number as the first argument", >> 339 | name); 340 | 341 | if (!(isNumber(argument_types[1]) || isDateOrDate32(argument_types[1]) || isDateTime(argument_types[1]) ================================================================================ src/Backups/BackupFileInfo.cpp ================================================================================ --- newly covered block 236-236 --- 234 | { 235 | if (failed) >> 236 | break; 237 | 238 | /// Passing references here is fine. All the objects are created **before** runner so they will be destroyed after it in case --- newly covered block 243-243 --- 241 | { 242 | if (failed) >> 243 | return; 244 | 245 | auto component_guard = Coordination::setCurrentComponent(current_component); --- newly covered block 258-259 --- 256 | catch (...) 257 | { >> 258 | failed = true; >> 259 | throw; 260 | } 261 | }); ================================================================================ src/Disks/IO/ReadBufferFromRemoteFSGather.cpp ================================================================================ --- newly covered block 150-155 --- 148 | { 149 | /// file has been read beyond new read until position already >> 150 | if (available() >= file_offset_of_buffer_end - position) 151 | { 152 | /// new read until position is after the current position in the working buffer >> 153 | working_buffer.resize(working_buffer.size() - (file_offset_of_buffer_end - position)); >> 154 | file_offset_of_buffer_end = position; >> 155 | pos = std::min(pos, working_buffer.end()); 156 | } 157 | else ================================================================================ src/Functions/FunctionsCodingIP.cpp ================================================================================ --- newly covered block 470-471 --- 468 | if (!isString(removeNullable(arguments[0]))) 469 | { >> 470 | throw Exception( >> 471 | ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "Illegal type {} of argument of function {}", arguments[0]->getName(), getName()); 472 | } 473 | --- newly covered block 621-622 --- 619 | { 620 | if (!WhichDataType(arguments[0]).isUInt64()) >> 621 | throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "Illegal type {} of argument of function {}, expected UInt64", >> 622 | arguments[0]->getName(), getName()); 623 | 624 | return std::make_shared(); ================================================================================ src/Functions/FunctionsExternalDictionaries.h ================================================================================ --- newly covered block 220-223 --- 218 | dictionary_name = name_col->getValue(); 219 | else >> 220 | throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, >> 221 | "Illegal type {} of first argument of function {}, expected a const string.", >> 222 | arguments[0].type->getName(), >> 223 | getName()); 224 | 225 | auto dictionary = helper.getDictionary(dictionary_name); ================================================================================ src/Functions/UserDefined/UserDefinedExecutableFunctionFactory.cpp ================================================================================ --- newly covered block 156-159 --- 154 | 155 | if (!FS::exists(script_path)) >> 156 | throw Exception(ErrorCodes::UNSUPPORTED_METHOD, >> 157 | "Executable file {} does not exist inside user scripts folder {}", >> 158 | command, >> 159 | user_scripts_path); 160 | 161 | if (!FS::canExecute(script_path)) ================================================================================ src/Functions/array/arrayTranspose.cpp ================================================================================ --- newly covered block 43-46 --- 41 | const DataTypeArray * outer_type = checkAndGetDataType(arguments[0].get()); 42 | if (!outer_type) >> 43 | throw Exception( >> 44 | ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, >> 45 | "Argument of function {} must be Array(Array(T)), got {}", >> 46 | getName(), arguments[0]->getName()); 47 | 48 | if (!checkAndGetDataType(outer_type->getNestedType().get())) ================================================================================ src/Functions/castOrDefault.cpp ================================================================================ --- newly covered block 67-70 --- 65 | size_t arguments_size = arguments.size(); 66 | if (arguments_size != 2 && arguments_size != 3) >> 67 | throw Exception(ErrorCodes::NUMBER_OF_ARGUMENTS_DOESNT_MATCH, >> 68 | "Function {} expected 2 or 3 arguments. Actual {}", >> 69 | getName(), >> 70 | arguments_size); 71 | 72 | const auto & type_column = arguments[1].column; ================================================================================ src/Functions/geoToS2.cpp ================================================================================ --- newly covered block 58-61 --- 56 | const auto * arg = arguments[i].get(); 57 | if (!WhichDataType(arg).isFloat64()) >> 58 | throw Exception( >> 59 | ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, >> 60 | "Illegal type {} of argument {} of function {}. Must be Float64", >> 61 | arg->getName(), i, getName()); 62 | } 63 | ================================================================================ src/Functions/h3HexAreaKm2.cpp ================================================================================ --- newly covered block 46-49 --- 44 | const auto * arg = arguments[0].get(); 45 | if (!WhichDataType(arg).isUInt8()) >> 46 | throw Exception( >> 47 | ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, >> 48 | "Illegal type {} of argument {} of function {}. Must be UInt8", >> 49 | arg->getName(), 1, getName()); 50 | 51 | return std::make_shared(); ================================================================================ src/Interpreters/BloomFilterHash.h ================================================================================ --- newly covered block 192-193 --- 190 | else if (which.isIPv6()) getNumberTypeHash(column, vec, pos); 191 | else if (which.isString()) getStringTypeHash(column, vec, pos); >> 192 | else if (which.isFixedString()) getStringTypeHash(column, vec, pos); >> 193 | else throw Exception(ErrorCodes::BAD_ARGUMENTS, "Unexpected type {} of bloom filter index.", data_type->getName()); 194 | } 195 | --- newly covered block 276-276 --- 274 | } 275 | } >> 276 | else if (const auto * fixed_string_index_column = typeid_cast(column)) 277 | { 278 | size_t fixed_len = fixed_string_index_column->getN(); --- newly covered block 292-292 --- 290 | } 291 | else >> 292 | throw Exception(ErrorCodes::ILLEGAL_COLUMN, "Illegal column type was passed to the bloom filter index."); 293 | } 294 | ================================================================================ src/Interpreters/InterpreterSelectQuery.cpp ================================================================================ --- newly covered block 636-639 --- 634 | if (table.table.table.empty()) 635 | continue; >> 636 | auto maybe_storage = DatabaseCatalog::instance().tryGetTable({table.table.database, table.table.table}, context); >> 637 | if (!maybe_storage) 638 | continue; >> 639 | checkStorageSupportsTransactionsIfNeeded(maybe_storage, context, /* is_readonly_query */ true); 640 | } 641 | } --- newly covered block 2626-2626 --- 2624 | auto filter_actions_dag = ActionsDAG::buildFilterActionsDAG(filter_nodes); 2625 | if (!filter_actions_dag) >> 2626 | return {}; 2627 | 2628 | return storage->totalRowsByPartitionPredicate(*filter_actions_dag, context); ================================================================================ src/Storages/MergeTree/MergeTreeData.cpp ================================================================================ --- newly covered block 7358-7362 --- 7356 | } 7357 | >> 7358 | tryLogException(error, log, >> 7359 | fmt::format("Failed to load part {} at try {} with a retryable error. Will retry in {} ms", part_name, try_no, backoff_ms)); 7360 | >> 7361 | std::this_thread::sleep_for(std::chrono::milliseconds(backoff_ms)); >> 7362 | backoff_ms = std::min(backoff_ms * 2, loading_parts_max_backoff_ms); 7363 | } 7364 | ================================================================================ src/Storages/ObjectStorageQueue/ObjectStorageQueueIFileMetadata.cpp ================================================================================ --- newly covered block 285-289 --- 283 | return false; 284 | >> 285 | LOG_TEST( >> 286 | log, "Processing node {} has processor: {}, current processor: {}", >> 287 | processing_node_path, data, processor_info); 288 | >> 289 | return data == processor_info; 290 | } 291 | ================================================================================ src/AggregateFunctions/AggregateFunctionGroupArrayIntersect.cpp ================================================================================ --- newly covered block 252-254 --- 250 | if constexpr (is_plain_column) 251 | { >> 252 | it = set.find(data_column->getDataAt(offset + i)); >> 253 | if (it != nullptr) >> 254 | new_set.emplace(ArenaKeyHolder{data_column->getDataAt(offset + i), *arena}, it, inserted); 255 | } 256 | else ================================================================================ src/Common/ProgressIndication.cpp ================================================================================ --- newly covered block 258-260 --- 256 | /// Render profiling_msg at left on top of the progress bar. 257 | >> 258 | message << "\033[30;42m" << profiling_msg << "\033[0m" >> 259 | << "\033[0;32m" << bar.substr(profiling_msg.size() * UNICODE_BAR_CHAR_SIZE) << "\033[0m" >> 260 | << std::string(width_of_progress_bar - bar_width_in_terminal, ' '); 261 | } 262 | else ================================================================================ src/Common/threadPoolCallbackRunner.h ================================================================================ --- newly covered block 210-211 --- 208 | if (!task->state.compare_exchange_strong(expected, RUNNING)) 209 | { >> 210 | if (expected == CANCELLED) >> 211 | return; 212 | throw Exception(ErrorCodes::LOGICAL_ERROR, "Unexpected state {} when running a task in {}", expected, thread_name); 213 | } --- newly covered block 255-255 --- 253 | /// It can be cancelled only when waiting in dtor 254 | if (state == CANCELLED) >> 255 | continue; 256 | if (task->future.valid()) 257 | task->future.wait(); ================================================================================ src/Coordination/KeeperDispatcher.cpp ================================================================================ --- newly covered block 434-436 --- 432 | if (!result) 433 | { >> 434 | addErrorResponses(current_batch, Coordination::Error::ZCONNECTIONLOSS); >> 435 | current_batch.clear(); >> 436 | current_batch_bytes_size = 0; 437 | } 438 | ================================================================================ src/Databases/DatabaseReplicatedWorker.cpp ================================================================================ --- newly covered block 453-454 --- 451 | 452 | if (our_log_ptr + database->db_settings[DatabaseReplicatedSetting::max_replication_lag_to_enqueue] < max_log_ptr) >> 453 | throw Exception(ErrorCodes::NOT_A_LEADER, "Cannot enqueue query on this replica, " >> 454 | "because it has replication lag of {} queries. Try other replica.", max_log_ptr - our_log_ptr); 455 | 456 | String entry_path = enqueueQueryImpl(zookeeper, entry, database, false, query_context->getDDLAdditionalChecksOnEnqueue()); --- newly covered block 662-662 --- 660 | /// because nullptr means "task should not be executed". 661 | /// We can only exit by exception. >> 662 | throw Exception(ErrorCodes::UNFINISHED, "Replication was stopped"); 663 | } 664 | ================================================================================ src/Functions/FunctionsBitmap.h ================================================================================ --- newly covered block 1125-1127 --- 1123 | const auto * bitmap_type0 = typeid_cast(arguments[0].get()); 1124 | if (!(bitmap_type0 && bitmap_type0->getFunctionName() == "groupBitmap")) >> 1125 | throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, >> 1126 | "First argument for function {} must be a bitmap but it has type {}", >> 1127 | getName(), arguments[0]->getName()); 1128 | 1129 | const auto * bitmap_type1 = typeid_cast(arguments[1].get()); ================================================================================ src/Functions/FunctionsStringHash.h ================================================================================ --- newly covered block 71-73 --- 69 | { 70 | if (!isUInt(arguments[1].type)) >> 71 | throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, >> 72 | "Second argument (shingle size) of function {} must be unsigned integer, got {}", >> 73 | getName(), arguments[1].type->getName()); 74 | 75 | if (!arguments[1].column) ================================================================================ src/Functions/TimeSeries/timeSeriesRange.cpp ================================================================================ --- newly covered block 178-180 --- 176 | else 177 | { >> 178 | throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, >> 179 | "Illegal result type {} of function {}, it must be {}", >> 180 | result_type, name, "DateTime64 or DateTime or UInt32"); 181 | } 182 | } ================================================================================ src/Functions/array/arraySlice.cpp ================================================================================ --- newly covered block 51-53 --- 49 | 50 | if (number_of_arguments < 2 || number_of_arguments > 3) >> 51 | throw Exception(ErrorCodes::NUMBER_OF_ARGUMENTS_DOESNT_MATCH, >> 52 | "Number of arguments for function {} doesn't match: passed {}, should be 2 or 3", >> 53 | getName(), number_of_arguments); 54 | 55 | if (arguments[0]->onlyNull()) ================================================================================ src/Functions/bar.cpp ================================================================================ --- newly covered block 56-58 --- 54 | { 55 | if (arguments.size() != 3 && arguments.size() != 4) >> 56 | throw Exception(ErrorCodes::NUMBER_OF_ARGUMENTS_DOESNT_MATCH, >> 57 | "Function {} requires from 3 or 4 parameters: value, min_value, max_value, [max_width_of_bar = 80]. " >> 58 | "Passed {}.", getName(), arguments.size()); 59 | 60 | if (!isNumber(arguments[0]) || !isNumber(arguments[1]) || !isNumber(arguments[2]) ================================================================================ src/Functions/toFixedString.h ================================================================================ --- newly covered block 151-153 --- 149 | else 150 | { >> 151 | auto column_fixed = ColumnFixedString::create(n); >> 152 | std::fill(vec_null_map_to->begin(), vec_null_map_to->end(), true); >> 153 | return ColumnNullable::create(column_fixed->cloneResized(column->size()), std::move(col_null_map_to)); 154 | } 155 | } ================================================================================ src/Interpreters/DDLWorker.cpp ================================================================================ --- newly covered block 1065-1065 --- 1063 | catch (...) 1064 | { >> 1065 | LOG_INFO(log, "An error occurred while checking and cleaning task {} from queue: {}", node_name, getCurrentExceptionMessage(false)); 1066 | } 1067 | } --- newly covered block 1467-1468 --- 1465 | } 1466 | >> 1467 | auto code = zookeeper->tryRemove(active_path, stat.version); >> 1468 | if (code != Coordination::Error::ZOK && code != Coordination::Error::ZNONODE) 1469 | throw Coordination::Exception::fromPath(code, active_path); 1470 | } ================================================================================ src/Storages/Kafka/KafkaConsumer2.cpp ================================================================================ --- newly covered block 115-117 --- 113 | return; 114 | // All the partition queues are detached, so the consumer shouldn't be able to poll any real messages >> 115 | const auto err = msg.get_error(); >> 116 | chassert(RD_KAFKA_RESP_ERR_NO_ERROR != err.get_error() && "Consumer returned a message when it was not expected"); >> 117 | LOG_ERROR(log, "Consumer received error while polling events, code {}, error '{}'", err.get_error(), err.to_string()); 118 | } 119 | }; ================================================================================ src/AggregateFunctions/AggregateFunctionDeltaSumTimestamp.cpp ================================================================================ --- newly covered block 232-233 --- 230 | 231 | if (!isInteger(arguments[0]) && !isFloat(arguments[0]) && !isDate(arguments[0]) && !isDateTime(arguments[0])) >> 232 | throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "Illegal type {} of argument for aggregate function {}, " >> 233 | "must be Int, Float, Date, DateTime", arguments[0]->getName(), name); 234 | 235 | if (!isInteger(arguments[1]) && !isFloat(arguments[1]) && !isDate(arguments[1]) && !isDateTime(arguments[1])) ================================================================================ src/AggregateFunctions/AggregateFunctionExponentialMovingAverage.cpp ================================================================================ --- newly covered block 236-237 --- 234 | for (const auto & type : argument_types) 235 | if (!isNumber(*type)) >> 236 | throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, >> 237 | "Both arguments for aggregate function {} must have numeric type, got {}", name, type->getName()); 238 | return std::make_shared(argument_types, params); 239 | }, ================================================================================ src/AggregateFunctions/AggregateFunctionGroupArrayMoving.cpp ================================================================================ --- newly covered block 241-242 --- 239 | 240 | if (!res) >> 241 | throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "Illegal type {} of argument for aggregate function {}", >> 242 | argument_type->getName(), name); 243 | 244 | return res; ================================================================================ src/AggregateFunctions/AggregateFunctionQuantileBFloat16.cpp ================================================================================ --- newly covered block 43-44 --- 41 | if (which.idx == TypeIndex::DateTime) return std::make_shared>(argument_types, params); 42 | >> 43 | throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "Illegal type {} of argument for aggregate function {}", >> 44 | argument_type->getName(), name); 45 | } 46 | ================================================================================ src/AggregateFunctions/AggregateFunctionStatisticsSimple.h ================================================================================ --- newly covered block 249-250 --- 247 | 248 | if (!res) >> 249 | throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "Illegal type {} of argument for aggregate function {}", >> 250 | argument_types[0]->getName(), name); 251 | return res; 252 | } ================================================================================ src/Common/ZooKeeper/ZooKeeperImpl.cpp ================================================================================ --- newly covered block 2056-2057 --- 2054 | if (auto maybe_zk_log = maybe_global_context->getZooKeeperLog()) 2055 | { >> 2056 | std::atomic_store_explicit(&zk_log, maybe_zk_log, std::memory_order_relaxed); >> 2057 | return maybe_zk_log; 2058 | } 2059 | } ================================================================================ src/Databases/DatabaseReplicated.cpp ================================================================================ --- newly covered block 277-277 --- 275 | const auto & max_log_pointer_str = get_result[0].data; 276 | if (get_result[0].error == Coordination::Error::ZNONODE) >> 277 | throw zkutil::KeeperException(get_result[0].error); 278 | 279 | response.max_log_ptr = max_log_pointer_str.empty() ? 0 : parse(max_log_pointer_str); --- newly covered block 294-294 --- 292 | catch (const Coordination::Exception &) 293 | { >> 294 | response.zookeeper_exception = getCurrentExceptionMessage(false); 295 | } 296 | } ================================================================================ src/Functions/FunctionStringReplace.h ================================================================================ --- newly covered block 134-135 --- 132 | return col_res; 133 | } >> 134 | throw Exception( >> 135 | ErrorCodes::ILLEGAL_COLUMN, "Illegal column {} of first argument of function {}", arguments[0].column->getName(), getName()); 136 | } 137 | }; ================================================================================ src/Functions/FunctionsConsistentHashing.h ================================================================================ --- newly covered block 46-47 --- 44 | { 45 | if (!isInteger(arguments[0]) && !isIPv4(arguments[0])) >> 46 | throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "Illegal type {} of the first argument of function {}", >> 47 | arguments[0]->getName(), getName()); 48 | 49 | if (arguments[0]->getSizeOfValueInMemory() > sizeof(HashType)) ================================================================================ src/Functions/FunctionsEmbeddedDictionaries.h ================================================================================ --- newly covered block 166-167 --- 164 | 165 | if (arguments[0]->getName() != TypeName) >> 166 | throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "Illegal type {} of argument of function {} (must be {})", >> 167 | arguments[0]->getName(), getName(), TypeName); 168 | 169 | if (arguments.size() == 2 && arguments[1]->getName() != "String") ================================================================================ src/Functions/FunctionsStringSearchToString.h ================================================================================ --- newly covered block 81-82 --- 79 | return col_res; 80 | } >> 81 | throw Exception( >> 82 | ErrorCodes::ILLEGAL_COLUMN, "Illegal column {} of argument of function {}", arguments[0].column->getName(), getName()); 83 | } 84 | }; ================================================================================ src/Functions/date_trunc.cpp ================================================================================ --- newly covered block 232-233 --- 230 | const ColumnConst * datepart_column = checkAndGetColumnConst(args[0].column.get()); 231 | if (!datepart_column) >> 232 | throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "First argument for function {} must be constant string: " >> 233 | "name of datepart", getName()); 234 | 235 | String datepart_param = Poco::toLower(datepart_column->getValue()); ================================================================================ src/Functions/obfuscateQuery.cpp ================================================================================ --- newly covered block 294-295 --- 292 | { 293 | if (arguments.empty()) >> 294 | throw Exception(ErrorCodes::NUMBER_OF_ARGUMENTS_DOESNT_MATCH, >> 295 | "Function {} requires at least 1 argument", getName()); 296 | 297 | if (arguments.size() > 2) ================================================================================ src/Functions/parseDateTime.cpp ================================================================================ --- newly covered block 2293-2294 --- 2291 | default: 2292 | if (isalpha(*cur_token)) >> 2293 | throw Exception( >> 2294 | ErrorCodes::NOT_IMPLEMENTED, "format is not supported for {}", String(cur_token, repetitions)); 2295 | 2296 | instructions.emplace_back(String(cur_token, pos - cur_token)); ================================================================================ src/Interpreters/ClusterProxy/executeQuery.cpp ================================================================================ --- newly covered block 1113-1114 --- 1111 | if (local_replica_index.value() != snapshot_replica_num.value()) 1112 | { >> 1113 | std::swap(connection_pools[local_replica_index.value()], connection_pools[snapshot_replica_num.value()]); >> 1114 | local_replica_index = snapshot_replica_num; 1115 | } 1116 | ================================================================================ src/Interpreters/DistributedQueryStatusSource.cpp ================================================================================ --- newly covered block 96-97 --- 94 | if (res[i].data.ends_with(DatabaseReplicated::REPLICA_UNSYNCED_MARKER)) 95 | { >> 96 | LOG_TRACE(log, "Replica {} is not fully synced after recovery, considering it as offline", hosts_array[i]); >> 97 | offline.insert(hosts_array[i]); 98 | } 99 | } ================================================================================ src/Processors/Formats/Impl/Parquet/ReadManager.cpp ================================================================================ --- newly covered block 358-359 --- 356 | } 357 | /// No steps, go directly to step 0 >> 358 | addTasksToReadColumns(row_group_idx, row_subgroup_idx, ReadStage::OffsetIndex, 0, diff); >> 359 | return; 360 | } 361 | case ReadStage::ColumnData: ================================================================================ src/Processors/QueryPlan/Optimizations/optimizeReadInOrder.cpp ================================================================================ --- newly covered block 1368-1368 --- 1366 | } 1367 | >> 1368 | if (auto * object_storage_step = typeid_cast(reading_node->step.get())) 1369 | { 1370 | auto order_info = buildInputOrderFromUnorderedKeys( --- newly covered block 1386-1386 --- 1384 | } 1385 | >> 1386 | return {}; 1387 | } 1388 | ================================================================================ src/Processors/Transforms/WindowTransform.cpp ================================================================================ --- newly covered block 1749-1750 --- 1747 | if (parameters_.size() != 1) 1748 | { >> 1749 | throw Exception(ErrorCodes::NUMBER_OF_ARGUMENTS_DOESNT_MATCH, >> 1750 | "Function {} takes exactly one parameter", name_); 1751 | } 1752 | return applyVisitor(FieldVisitorConvertToNumber(), parameters_[0]); ================================================================================ src/Storages/StorageMergeTree.cpp ================================================================================ --- newly covered block 1864-1865 --- 1862 | if (!entry.tid.isNonTransactional()) 1863 | { >> 1864 | end_it = it; >> 1865 | break; 1866 | } 1867 | ================================================================================ src/Functions/toModifiedJulianDay.cpp ================================================================================ --- newly covered block 172-172 --- 170 | String getName() const override 171 | { >> 172 | return Name::name; 173 | } 174 | ================================================================================ src/Columns/ColumnBLOB.h ================================================================================ --- newly covered block 75-75 --- 73 | 74 | public: >> 75 | const char * getFamilyName() const override { return "BLOB"; } 76 | 77 | size_t size() const override { return rows; } ================================================================================ src/Functions/today.cpp ================================================================================ --- newly covered block 66-66 --- 64 | static constexpr auto name = "today"; 65 | >> 66 | String getName() const override { return name; } 67 | 68 | bool isDeterministic() const override { return false; } ================================================================================ src/Interpreters/InterpreterSelectWithUnionQuery.h ================================================================================ --- newly covered block 52-52 --- 50 | void ignoreWithTotals() override; 51 | >> 52 | bool supportsTransactions() const override { return true; } 53 | 54 | private: ================================================================================ base/base/cgroupsv2.cpp ================================================================================ --- newly covered block 19-19 --- 17 | if (!fs::exists(controllers_file)) 18 | return false; >> 19 | return true; 20 | } 21 | catch (const fs::filesystem_error &) /// all "underlying OS API errors", typically: permission denied ================================================================================ programs/server/Server.cpp ================================================================================ --- newly covered block 1770-1770 --- 1768 | if (stored_binary_hash.empty()) 1769 | { >> 1770 | LOG_WARNING(log, "Integrity check of the executable skipped because the reference checksum could not be read."); 1771 | } 1772 | else ================================================================================ src/AggregateFunctions/AggregateFunctionQuantileBFloat16Weighted.cpp ================================================================================ --- newly covered block 30-30 --- 28 | { 29 | if (argument_types.empty()) >> 30 | throw Exception(ErrorCodes::TOO_FEW_ARGUMENTS_FOR_FUNCTION, "Aggregate function {} requires at least one argument", name); 31 | 32 | const DataTypePtr & argument_type = argument_types[0]; ================================================================================ src/AggregateFunctions/AggregateFunctionQuantileExactHigh.cpp ================================================================================ --- newly covered block 32-32 --- 30 | { 31 | if (argument_types.empty()) >> 32 | throw Exception(ErrorCodes::TOO_FEW_ARGUMENTS_FOR_FUNCTION, "Aggregate function {} requires at least one argument", name); 33 | 34 | const DataTypePtr & argument_type = argument_types[0]; ================================================================================ src/AggregateFunctions/AggregateFunctionQuantileTDigestWeighted.cpp ================================================================================ --- newly covered block 31-31 --- 29 | { 30 | if (argument_types.empty()) >> 31 | throw Exception(ErrorCodes::NUMBER_OF_ARGUMENTS_DOESNT_MATCH, "Aggregate function {} requires at least one argument", name); 32 | 33 | const DataTypePtr & argument_type = argument_types[0]; ================================================================================ src/Columns/ColumnVariant.cpp ================================================================================ --- newly covered block 1479-1479 --- 1477 | else if (direction == IColumn::PermutationSortDirection::Descending && stability == IColumn::PermutationSortStability::Unstable) 1478 | updatePermutationImpl(limit, res, equal_ranges, ComparatorDescendingUnstable(*this, nan_direction_hint), comparator_equal, DefaultSort(), DefaultPartialSort()); >> 1479 | else if (direction == IColumn::PermutationSortDirection::Descending && stability == IColumn::PermutationSortStability::Stable) 1480 | updatePermutationImpl(limit, res, equal_ranges, ComparatorDescendingStable(*this, nan_direction_hint), comparator_equal, DefaultSort(), DefaultPartialSort()); 1481 | } ================================================================================ src/Columns/ColumnVector.cpp ================================================================================ --- newly covered block 1115-1115 --- 1113 | 1114 | if (!compressed) >> 1115 | return ColumnCompressed::wrap(this->getPtr()); 1116 | 1117 | const size_t compressed_size = compressed->size(); ================================================================================ src/Common/Config/ConfigReloader.cpp ================================================================================ --- newly covered block 159-159 --- 157 | 158 | LOG_ERROR(log, "Error loading config from '{}': {}", config_path, getExceptionMessageForLogging(*exc, /*with_stacktrace=*/false, /*check_embedded_stacktrace=*/false)); >> 159 | return std::nullopt; 160 | } 161 | config_processor.savePreprocessedConfig(loaded_config, preprocessed_dir); ================================================================================ src/Common/Elf.cpp ================================================================================ --- newly covered block 186-186 --- 184 | if (auto section = findSectionByName(".clickhouse.hash")) 185 | return {section->begin(), section->end()}; >> 186 | return {}; 187 | } 188 | ================================================================================ src/Common/FailPoint.cpp ================================================================================ --- newly covered block 343-343 --- 341 | auto iter = fail_point_wait_channels.find(fail_point_name); 342 | if (iter == fail_point_wait_channels.end()) >> 343 | return; 344 | 345 | auto channel = iter->second; ================================================================================ src/Common/SystemLogBase.cpp ================================================================================ --- newly covered block 77-77 --- 75 | /// Better to drop these events to avoid complications. 76 | if (recursive_push_call) >> 77 | return; 78 | recursive_push_call = true; 79 | SCOPE_EXIT({ recursive_push_call = false; }); ================================================================================ src/Coordination/KeeperServer.cpp ================================================================================ --- newly covered block 808-808 --- 806 | ProfiledMutexLock lock(server_write_mutex, ProfileEvents::KeeperServerWriteLockWaitMicroseconds); 807 | if (is_recovering) >> 808 | return nullptr; 809 | 810 | return raft_instance->append_entries(entries); ================================================================================ src/Core/DecimalComparison.h ================================================================================ --- newly covered block 90-90 --- 88 | if (check_overflow) 89 | return applyWithScale(a, b, shift); >> 90 | return applyWithScale(a, b, shift); 91 | } 92 | ================================================================================ src/DataTypes/NestedUtils.cpp ================================================================================ --- newly covered block 117-117 --- 115 | } 116 | >> 117 | return std::nullopt; 118 | } 119 | ================================================================================ src/Disks/DiskObjectStorage/MetadataStorages/MetadataOperationsHolder.cpp ================================================================================ --- newly covered block 88-88 --- 86 | catch (...) 87 | { >> 88 | tryLogCurrentException(__PRETTY_FUNCTION__, fmt::format("Failed to finalize operation #{}", i)); 89 | } 90 | } ================================================================================ src/Disks/DiskObjectStorage/ObjectStorages/Local/LocalObjectStorage.cpp ================================================================================ --- newly covered block 337-337 --- 335 | if (errno == ENOTDIR || errno == ENOTEMPTY) 336 | break; >> 337 | ErrnoException::throwFromPath(ErrorCodes::CANNOT_RMDIR, dir_str, "Cannot remove directory {}", dir_str); 338 | } 339 | ================================================================================ src/Functions/DateTimeTransforms.h ================================================================================ --- newly covered block 2612-2612 --- 2610 | size_t time_zone_argument_position = 1; 2611 | if constexpr (std::is_same_v || std::is_same_v) >> 2612 | time_zone_argument_position = 2; 2613 | 2614 | const DateLUTImpl & time_zone = extractTimeZoneFromFunctionArguments(arguments, time_zone_argument_position, 0); ================================================================================ src/Functions/FunctionBitTestMany.h ================================================================================ --- newly covered block 45-45 --- 43 | 44 | if (!isInteger(first_arg)) >> 45 | throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "Illegal type {} of first argument of function {}", first_arg->getName(), getName()); 46 | 47 | ================================================================================ src/Functions/FunctionSQLJSON.h ================================================================================ --- newly covered block 599-599 --- 597 | { 598 | if (arguments.size() < 2) >> 599 | throw Exception(ErrorCodes::TOO_FEW_ARGUMENTS_FOR_FUNCTION, "Function JSON_VALUE requires at least 2 arguments"); 600 | 601 | if (FunctionSQLJSONHelpers::isMultiPathType(arguments[1].type)) ================================================================================ src/Functions/FunctionUnaryArithmetic.h ================================================================================ --- newly covered block 202-202 --- 200 | 201 | if constexpr (!IsUnaryOperation::negate) >> 202 | return {}; 203 | 204 | return FunctionFactory::instance().get("tupleNegate", context_); ================================================================================ src/Functions/FunctionsJSON.cpp ================================================================================ --- newly covered block 1080-1080 --- 1078 | { 1079 | if (arguments.size() < 2) >> 1080 | throw Exception(ErrorCodes::NUMBER_OF_ARGUMENTS_DOESNT_MATCH, "Function {} requires at least two arguments", String(function_name)); 1081 | 1082 | const auto & col = arguments.back(); ================================================================================ src/Functions/JSONPaths.cpp ================================================================================ --- newly covered block 105-105 --- 103 | 104 | if (data_types[0]->getTypeId() != TypeIndex::Object) >> 105 | throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "Function {} requires argument with type JSON, got: {}", getName(),data_types[0]->getName()); 106 | 107 | if constexpr (Impl::with_types) ================================================================================ src/Functions/array/arrayConcat.cpp ================================================================================ --- newly covered block 24-24 --- 22 | { 23 | if (arguments.empty()) >> 24 | throw Exception(ErrorCodes::NUMBER_OF_ARGUMENTS_DOESNT_MATCH, "Function {} requires at least one argument.", getName()); 25 | 26 | for (auto i : collections::range(0, arguments.size())) ================================================================================ src/Functions/array/arrayReduce.cpp ================================================================================ --- newly covered block 111-111 --- 109 | } 110 | else >> 111 | throw Exception(ErrorCodes::ILLEGAL_COLUMN, "Illegal column {} as argument of function {}", col->getName(), getName()); 112 | 113 | if (i == 0) ================================================================================ src/Functions/fromModifiedJulianDay.cpp ================================================================================ --- newly covered block 199-199 --- 197 | if (!isInteger(arguments[0])) 198 | { >> 199 | throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "The argument of function {} must be integral", getName()); 200 | } 201 | ================================================================================ src/Functions/readWkb.cpp ================================================================================ --- newly covered block 58-58 --- 56 | && checkAndGetDataType(arguments[0].get()) == nullptr) 57 | { >> 58 | throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "First argument should be String"); 59 | } 60 | ================================================================================ src/Functions/svg.cpp ================================================================================ --- newly covered block 55-55 --- 53 | if (arguments.empty() || arguments.size() > 2) 54 | { >> 55 | throw Exception(ErrorCodes::NUMBER_OF_ARGUMENTS_DOESNT_MATCH, "Incorrect number of arguments: expected 1 or 2 arguments"); 56 | } 57 | if (arguments.size() == 2 && checkAndGetDataType(arguments[1].get()) == nullptr) ================================================================================ src/IO/AzureBlobStorage/PocoHTTPClient.cpp ================================================================================ --- newly covered block 177-177 --- 175 | return AzureMetricKind::Write; 176 | >> 177 | throw Exception(ErrorCodes::NOT_IMPLEMENTED, "Unsupported request method: {}", method); 178 | } 179 | ================================================================================ src/IO/S3/PocoHTTPClient.cpp ================================================================================ --- newly covered block 375-375 --- 373 | case S3LatencyType::FirstByteAttempt1: return "1"; 374 | case S3LatencyType::FirstByteAttempt2: return "2"; >> 375 | case S3LatencyType::FirstByteAttemptN: return "N"; 376 | default: return "UNKNOWN"; 377 | } ================================================================================ src/IO/copyData.cpp ================================================================================ --- newly covered block 38-38 --- 36 | 37 | if (check_bytes && bytes > 0) >> 38 | throw Exception(ErrorCodes::ATTEMPT_TO_READ_AFTER_EOF, "Attempt to read after EOF, left to copy {} bytes.", bytes); 39 | } 40 | ================================================================================ src/Interpreters/ClusterDiscovery.cpp ================================================================================ --- newly covered block 674-674 --- 672 | * should not stop discovery forever 673 | */ >> 674 | tryLogCurrentException(log, "Caught exception in cluster discovery runMainThread"); 675 | } 676 | std::this_thread::sleep_for(backoff_timeout); ================================================================================ src/Interpreters/FileCache/FileCache.cpp ================================================================================ --- newly covered block 748-748 --- 746 | 747 | if (is_limit_reached()) >> 748 | erase_unprocessed(); 749 | } 750 | } ================================================================================ src/Interpreters/FileCache/FileSegment.cpp ================================================================================ --- newly covered block 253-253 --- 251 | bool allow_new_downloader = download_state == State::EMPTY || download_state == State::PARTIALLY_DOWNLOADED; 252 | if (!allow_new_downloader) >> 253 | return "notAllowed:" + stateToString(download_state); 254 | 255 | current_downloader = downloader_id = caller_id; ================================================================================ src/Interpreters/IJoin.h ================================================================================ --- newly covered block 197-197 --- 195 | { 196 | if (finished) >> 197 | return {}; 198 | 199 | if (Block res = nextImpl(); !res.empty()) ================================================================================ src/Interpreters/InterpreterCreateQuery.cpp ================================================================================ --- newly covered block 2228-2228 --- 2226 | return getRandomASCIIString(/*length=*/8) + getHexUIntLowercase(hashed_query_id); 2227 | } >> 2228 | return getRandomASCIIString(/*length=*/16); 2229 | }(); 2230 | ================================================================================ src/Interpreters/JoinExpressionActions.cpp ================================================================================ --- newly covered block 146-146 --- 144 | else 145 | throw Exception(ErrorCodes::LOGICAL_ERROR, "Input node {} from is not in headers: [{}] [{}], dag: {}", >> 146 | column_name, actions_dag_.dumpDAG(), left_header.dumpNames(), right_header.dumpNames()); 147 | expression_sources[input_nodes[i]] = rels; 148 | } ================================================================================ src/Interpreters/JoinOperator.cpp ================================================================================ --- newly covered block 324-324 --- 322 | else 323 | { >> 324 | LOG_TRACE(getLogger("JoinSettings"), "No system memory limits configured. Ignoring max_bytes_ratio_before_external_join"); 325 | } 326 | } ================================================================================ src/Interpreters/MergeTreeTransaction/VersionInfo.cpp ================================================================================ --- newly covered block 181-181 --- 179 | return true; 180 | if (creation_csn && creation_csn <= snapshot_version && removal_csn && snapshot_version < removal_csn) >> 181 | return true; 182 | if (!current_tid.isEmpty() && creation_tid == current_tid) 183 | return true; ================================================================================ src/Interpreters/convertFieldToType.cpp ================================================================================ --- newly covered block 403-403 --- 401 | } 402 | >> 403 | return DecimalField(DecimalUtils::decimalFromComponentsWithMultiplier(value, 0, 1), scale_to); 404 | } 405 | ================================================================================ src/Parsers/ExpressionListParsers.cpp ================================================================================ --- newly covered block 2179-2179 --- 2177 | { 2178 | if (!mergeElement()) >> 2179 | return false; 2180 | 2181 | if (noop) ================================================================================ src/Planner/PlannerJoinTree.cpp ================================================================================ --- newly covered block 487-487 --- 485 | { 486 | throw Exception(ErrorCodes::LOGICAL_ERROR, "Expected table, table function, query or union. Actual {}", >> 487 | table_expression->formatASTForErrorMessage()); 488 | } 489 | ================================================================================ src/Processors/Executors/PipelineExecutor.cpp ================================================================================ --- newly covered block 519-519 --- 517 | else 518 | { >> 519 | return std::make_shared(master_threads, worker_threads, master_thread_link, worker_thread_link); 520 | } 521 | } ================================================================================ src/Processors/Formats/Impl/Parquet/Decoding.cpp ================================================================================ --- newly covered block 1346-1346 --- 1344 | } 1345 | else >> 1346 | chassert(false); 1347 | } 1348 | else ================================================================================ src/Processors/Merges/Algorithms/SummingSortedAlgorithm.cpp ================================================================================ --- newly covered block 774-774 --- 772 | } 773 | else >> 774 | desc.merged_column->insertDefault(); 775 | } 776 | ================================================================================ src/Processors/QueryPlan/AggregatingStep.cpp ================================================================================ --- newly covered block 623-623 --- 621 | { 622 | /// Keep original for columns not in output (e.g., intermediate aggregate states) >> 623 | adapted_header->insert(column.cloneEmpty()); 624 | } 625 | } ================================================================================ src/Server/HTTP/ReadHeaders.cpp ================================================================================ --- newly covered block 52-52 --- 50 | /// Start of the empty-line delimiter 51 | break; >> 52 | if (ch == ':') 53 | throw Poco::Net::MessageException("Field name is empty"); 54 | } ================================================================================ src/Storages/MergeTree/DataPartsExchange.cpp ================================================================================ --- newly covered block 559-559 --- 557 | } 558 | } >> 559 | else if (!disk) 560 | { 561 | LOG_TEST(log, "Making balanced reservation"); ================================================================================ src/Storages/MergeTree/KeyCondition.cpp ================================================================================ --- newly covered block 4859-4859 --- 4857 | } 4858 | else >> 4859 | rpn_stack.emplace_back(true, true); 4860 | 4861 | /** Note: we can consider implementing a simpler solution, based on "hidden keys". ================================================================================ src/Storages/MergeTree/MergeTreeDataPartWide.cpp ================================================================================ --- newly covered block 552-552 --- 550 | filename = getStreamNameForColumn(column, substream_path, DATA_FILE_EXTENSION, checksums, storage.getSettings()); 551 | else >> 552 | filename = getStreamNameForColumn(column, substream_path, DATA_FILE_EXTENSION, getDataPartStorage(), storage.getSettings()); 553 | } 554 | }); ================================================================================ src/Storages/MergeTree/RPNBuilder.cpp ================================================================================ --- newly covered block 443-443 --- 441 | return column_set->getData(); 442 | >> 443 | return {}; 444 | } 445 | ================================================================================ src/Storages/MergeTree/ReplicatedMergeTreeAltersSequence.cpp ================================================================================ --- newly covered block 12-12 --- 10 | if (!queue_state.empty()) 11 | return queue_state.begin()->first; >> 12 | return -1; 13 | } 14 | ================================================================================ src/Storages/MergeTree/ReplicatedMergeTreeQueue.cpp ================================================================================ --- newly covered block 1470-1470 --- 1468 | { 1469 | if (!entry->currently_executing) >> 1470 | continue; 1471 | 1472 | const auto virtual_part_names = entry->getVirtualPartNames(format_version); ================================================================================ src/Storages/ObjectStorage/DataLakes/Iceberg/ComplexTypeSchemaProcessorFunctions.cpp ================================================================================ --- newly covered block 617-617 --- 615 | result_column->insert(result_node); 616 | } >> 617 | else if (column_field.tryGet(current_map_node)) 618 | { 619 | ComplexNode tuple_node = current_map_node; ================================================================================ src/Storages/ObjectStorageQueue/ObjectStorageQueueMetadata.cpp ================================================================================ --- newly covered block 1165-1165 --- 1163 | 1164 | if (shutdown_called.load()) >> 1165 | break; 1166 | 1167 | wait_event->tryWait(1000); ================================================================================ src/Storages/Statistics/Statistics.cpp ================================================================================ --- newly covered block 163-163 --- 161 | if (auto result = stats.at(StatisticsType::MinMax)->estimateLess(val)) 162 | return result; >> 163 | return std::nullopt; 164 | } 165 | ================================================================================ src/Storages/System/StorageSystemTables.cpp ================================================================================ --- newly covered block 926-926 --- 924 | { 925 | if (metadata_snapshot && metadata_snapshot->sql_security_type == SQLSecurityType::DEFINER) >> 926 | res_columns[res_index++]->insert(*metadata_snapshot->definer); 927 | else 928 | res_columns[res_index++]->insertDefault(); ================================================================================ src/Storages/VirtualColumnUtils.cpp ================================================================================ --- newly covered block 422-422 --- 420 | chunk.addColumn(virtual_column.type->createColumnConst(chunk.getNumRows(), *virtual_values.size)->convertToFullColumnIfConst()); 421 | else >> 422 | chunk.addColumn(virtual_column.type->createColumnConstWithDefaultValue(chunk.getNumRows())->convertToFullColumnIfConst()); 423 | } 424 | else if (virtual_column.name == "_time") ================================================================================ src/TableFunctions/TableFunctionLoop.cpp ================================================================================ --- newly covered block 95-95 --- 93 | else 94 | { >> 95 | throw Exception(ErrorCodes::NUMBER_OF_ARGUMENTS_DOESNT_MATCH, "Table function 'loop' must have 1 or 2 arguments."); 96 | } 97 | } WARNING: Failed to get start time for [Newly Covered Code] - start time and duration won't be set