Parsing baseline coverage from /home/ubuntu/actions-runner/_work/ClickHouse/ClickHouse/ci/tmp//base_llvm_coverage.info ... 6806 files in baseline Parsing current coverage from /home/ubuntu/actions-runner/_work/ClickHouse/ClickHouse/ci/tmp//llvm_coverage.info ... 6806 files in current Parsing second baseline coverage from /home/ubuntu/actions-runner/_work/ClickHouse/ClickHouse/ci/tmp//base_llvm_coverage_2.info ... 6806 files in second baseline cross-validation enabled: requiring uncovered in both master baselines (143,756 candidate lines / 82,979 functions in B2) Overall coverage delta (current vs master baseline): Lines : -0.0117 pp (84.6643% -> 84.6526%, -110 covered) Functions: -0.0047 pp (91.3877% -> 91.3830%, -46 covered) Newly covered: 484 line(s), 31 function(s) across 145 file(s) All 145 file(s) with newly-covered code, ranked by line count: src/Storages/RabbitMQ/RabbitMQSource.cpp: 50 line(s), 2 function(s) src/Backups/BackupEntriesCollector.cpp: 29 line(s), 2 function(s) src/Storages/RabbitMQ/StorageRabbitMQ.cpp: 16 line(s), 2 function(s) src/Interpreters/DeadLetterQueue.cpp: 13 line(s), 1 function(s) src/Storages/StorageReplicatedMergeTree.cpp: 13 line(s) src/Storages/RabbitMQ/RabbitMQConsumer.cpp: 12 line(s), 1 function(s) src/Functions/FunctionGenerateRandomStructure.cpp: 12 line(s) src/Server/DistributedQuery/StreamingExchangeSink.cpp: 10 line(s), 1 function(s) src/IO/S3/copyS3File.cpp: 10 line(s) src/AggregateFunctions/AggregateFunctionQuantileInterpolatedWeighted.cpp: 9 line(s) src/Common/ColumnsHashing.h: 8 line(s), 2 function(s) src/Storages/MergeTree/ReplicatedMergeTreePartCheckThread.cpp: 8 line(s), 1 function(s) src/AggregateFunctions/AggregateFunctionQuantileExactWeighted.cpp: 8 line(s) src/Functions/array/FunctionArrayMapped.h: 8 line(s) src/Storages/MutationCommands.cpp: 8 line(s) src/Common/StringUtils.h: 7 line(s), 1 function(s) src/Storages/RabbitMQ/RabbitMQConnection.cpp: 7 line(s), 1 function(s) src/Processors/Transforms/WindowTransform.cpp: 7 line(s) src/Interpreters/FileCache/FileSegment.cpp: 6 line(s), 1 function(s) src/Analyzer/Resolve/QueryAnalyzer.cpp: 6 line(s) src/Functions/FunctionsEmbeddedDictionaries.h: 6 line(s) src/Interpreters/Aggregator.cpp: 6 line(s) src/Storages/StorageFuzzJSON.cpp: 6 line(s) src/Functions/structureToFormatSchema.cpp: 5 line(s) src/Server/SSH/SSHPtyHandler.cpp: 5 line(s) src/Storages/ConstraintsDescription.cpp: 5 line(s) src/AggregateFunctions/TimeSeries/AggregateFunctionLast2Samples.cpp: 4 line(s) src/Functions/h3HexAreaKm2.cpp: 4 line(s) src/IO/parseDateTimeBestEffort.cpp: 4 line(s) src/Storages/MaterializedView/RefreshSchedule.cpp: 4 line(s) src/Storages/ObjectStorageQueue/ObjectStorageQueueIFileMetadata.cpp: 4 line(s) src/Storages/System/StorageSystemStackTrace.cpp: 4 line(s) src/Functions/FunctionsNumericIndexedVector.h: 3 line(s), 3 function(s) src/Functions/formatRow.cpp: 3 line(s), 1 function(s) base/base/BorrowedObjectPool.h: 3 line(s) src/AggregateFunctions/TimeSeries/AggregateFunctionTimeseriesHelpers.cpp: 3 line(s) src/Databases/DatabaseReplicated.cpp: 3 line(s) src/Functions/FunctionsExternalDictionaries.h: 3 line(s) src/Functions/HasSubsequenceImpl.h: 3 line(s) src/Functions/TimeSeries/timeSeriesRange.cpp: 3 line(s) src/Functions/array/arrayEnumerateExtended.h: 3 line(s) src/Functions/array/arraySlice.cpp: 3 line(s) src/Functions/isDecimalOverflow.cpp: 3 line(s) src/Interpreters/ClusterDiscovery.cpp: 3 line(s) src/Server/StatelessWorker/StatelessWorkerEndpoint.cpp: 3 line(s) src/Storages/MergeTree/Compaction/MergePredicates/ReplicatedMergeTreeMergePredicate.cpp: 3 line(s) src/TableFunctions/TableFunctionGenerateRandom.cpp: 3 line(s) src/Storages/RabbitMQ/StorageRabbitMQ.h: 2 line(s), 2 function(s) src/Disks/DiskObjectStorage/DiskObjectStorageTransaction.cpp: 2 line(s), 1 function(s) base/base/chrono_io.h: 2 line(s) src/AggregateFunctions/AggregateFunctionDeltaSum.cpp: 2 line(s) src/AggregateFunctions/AggregateFunctionGroupUniqArray.cpp: 2 line(s) src/AggregateFunctions/AggregateFunctionQuantileBFloat16Weighted.cpp: 2 line(s) src/Common/Scheduler/Nodes/CustomResourceManager.cpp: 2 line(s) src/Common/Scheduler/Nodes/WorkloadResourceManager.cpp: 2 line(s) src/DataTypes/Serializations/SerializationObjectSharedData.cpp: 2 line(s) src/Disks/IO/CachedOnDiskReadBufferFromFile.cpp: 2 line(s) src/Formats/JSONUtils.cpp: 2 line(s) src/Functions/FunctionDateOrDateTimeAddInterval.h: 2 line(s) src/Functions/FunctionsCodingIP.cpp: 2 line(s) src/Functions/FunctionsConsistentHashing.h: 2 line(s) src/Functions/FunctionsStringHashFixedString.cpp: 2 line(s) src/Functions/TimeSeries/TimeSeriesTagsFunctionHelpers.cpp: 2 line(s) src/Functions/addressToLine.h: 2 line(s) src/Functions/array/arrayElement.cpp: 2 line(s) src/Functions/map.cpp: 2 line(s) src/Functions/substring.cpp: 2 line(s) src/Functions/validateNestedArraySizes.cpp: 2 line(s) src/Functions/vectorFunctions.cpp: 2 line(s) src/IO/S3/PocoHTTPClient.cpp: 2 line(s) src/Interpreters/ActionsDAG.cpp: 2 line(s) src/Parsers/CreateQueryUUIDs.cpp: 2 line(s) src/Processors/QueryPlan/ExpressionStep.cpp: 2 line(s) src/Processors/Transforms/MergeJoinTransform.cpp: 2 line(s) src/Server/KeeperTCPHandler.cpp: 2 line(s) src/Storages/IMessageProducer.cpp: 2 line(s) src/Storages/Kafka/StorageKafka2.cpp: 2 line(s) src/Storages/ObjectStorage/DataLakes/Iceberg/IcebergPath.cpp: 2 line(s) src/Storages/ObjectStorage/DataLakes/Iceberg/Utils.cpp: 2 line(s) src/Storages/ObjectStorageQueue/ObjectStorageQueueMetadata.cpp: 2 line(s) src/Storages/ObjectStorageQueue/ObjectStorageQueueSource.cpp: 2 line(s) src/Storages/ObjectStorageQueue/ObjectStorageQueueUnorderedFileMetadata.cpp: 2 line(s) src/Storages/System/StorageSystemParts.cpp: 2 line(s) src/Storages/System/StorageSystemZooKeeper.cpp: 2 line(s) src/Storages/RabbitMQ/RabbitMQ_fwd.h: 1 line(s), 3 function(s) src/AggregateFunctions/AggregateFunctionAggThrow.cpp: 1 line(s), 1 function(s) src/Columns/ColumnReplicated.h: 1 line(s), 1 function(s) src/Functions/ifNull.cpp: 1 line(s), 1 function(s) src/Functions/reverse.cpp: 1 line(s), 1 function(s) src/Functions/toTimezone.cpp: 1 line(s), 1 function(s) src/Storages/MessageQueueSink.cpp: 1 line(s), 1 function(s) programs/server/Server.cpp: 1 line(s) src/AggregateFunctions/AggregateFunctionGroupArrayIntersect.cpp: 1 line(s) src/AggregateFunctions/AggregateFunctionKolmogorovSmirnovTest.cpp: 1 line(s) src/AggregateFunctions/AggregateFunctionQuantileDD.cpp: 1 line(s) src/AggregateFunctions/AggregateFunctionQuantileExactLow.cpp: 1 line(s) src/AggregateFunctions/AggregateFunctionQuantileGK.cpp: 1 line(s) src/AggregateFunctions/AggregateFunctionUniqCombined.cpp: 1 line(s) src/AggregateFunctions/AggregateFunctionVarianceMatrix.cpp: 1 line(s) src/Backups/BackupCoordinationReplicatedTables.cpp: 1 line(s) src/Columns/ColumnObject.cpp: 1 line(s) src/Common/AsyncLoader.cpp: 1 line(s) src/Common/Elf.cpp: 1 line(s) src/Common/UDFProcessSubtreeSampler.cpp: 1 line(s) src/Coordination/KeeperSnapshotManager.cpp: 1 line(s) src/Coordination/RocksDBContainer.h: 1 line(s) src/Core/QualifiedTableName.cpp: 1 line(s) src/Databases/DDLDependencyVisitor.cpp: 1 line(s) src/Dictionaries/LibraryDictionarySource.cpp: 1 line(s) src/Functions/FunctionsBitToArray.cpp: 1 line(s) src/Functions/FunctionsConversion.h: 1 line(s) src/Functions/FunctionsHashing.h: 1 line(s) src/Functions/if.cpp: 1 line(s) src/Functions/normalizedQueryHash.cpp: 1 line(s) src/Functions/patchPartitionID.cpp: 1 line(s) src/Functions/pointInPolygon.cpp: 1 line(s) src/Functions/toStartOfInterval.cpp: 1 line(s) src/IO/PeekableReadBuffer.cpp: 1 line(s) src/Interpreters/ActionsVisitor.cpp: 1 line(s) src/Interpreters/ArrayJoinAction.cpp: 1 line(s) src/Interpreters/BloomFilterHash.h: 1 line(s) src/Interpreters/ExternalDictionariesLoader.cpp: 1 line(s) src/Interpreters/FileCache/FileCache.cpp: 1 line(s) src/Interpreters/FileCache/Metadata.cpp: 1 line(s) src/Interpreters/InsertDependenciesBuilder.cpp: 1 line(s) src/Parsers/ExpressionListParsers.cpp: 1 line(s) src/Planner/PlannerJoinTree.cpp: 1 line(s) src/Processors/Formats/Impl/Parquet/Decoding.cpp: 1 line(s) src/Processors/QueryPlan/Optimizations/optimizeLazyMaterialization.cpp: 1 line(s) src/Processors/QueryPlan/ReadFromSystemNumbersStep.cpp: 1 line(s) src/Storages/FileLog/FileLogSource.cpp: 1 line(s) src/Storages/MergeTree/IMergeTreeDataPart.h: 1 line(s) src/Storages/MergeTree/KeyCondition.cpp: 1 line(s) src/Storages/MergeTree/MergeTreeIndexBloomFilter.cpp: 1 line(s) src/Storages/MergeTree/ReplicatedMergeTreeQueue.cpp: 1 line(s) src/Storages/ObjectStorage/DataLakes/Common/AvroForIcebergDeserializer.cpp: 1 line(s) src/Storages/RabbitMQ/RabbitMQProducer.cpp: 1 line(s) src/Storages/Statistics/ConditionSelectivityEstimator.cpp: 1 line(s) src/Storages/Statistics/Statistics.cpp: 1 line(s) src/Storages/System/StorageSystemClusters.cpp: 1 line(s) src/Storages/System/StorageSystemDataSkippingIndices.cpp: 1 line(s) src/Storages/System/StorageSystemDroppedTablesParts.cpp: 1 line(s) src/Storages/VirtualColumnsDescription.cpp: 1 line(s) src/TableFunctions/TableFunctionMergeTreeAnalyzeIndexes.cpp: 1 line(s) src/TableFunctions/TableFunctionRemote.cpp: 1 line(s) Newly covered code (with context): ================================================================================ src/Storages/RabbitMQ/RabbitMQSource.cpp ================================================================================ --- newly covered block 110-110 --- 108 | 109 | if (!consumer) >> 110 | return; 111 | 112 | storage.pushConsumer(consumer); --- newly covered block 184-212 --- 182 | auto on_error = [&](const MutableColumns & result_columns, const ColumnCheckpoints & checkpoints, Exception & e) 183 | { >> 184 | switch (handle_error_mode) 185 | { >> 186 | case StreamingHandleErrorMode::STREAM: 187 | { >> 188 | exception_message = e.message(); >> 189 | for (size_t i = 0; i < result_columns.size(); ++i) 190 | { 191 | // We could already push some rows to result_columns before exception, we need to fix it. >> 192 | result_columns[i]->rollback(*checkpoints[i]); 193 | 194 | // All data columns will get default value in case of error. >> 195 | result_columns[i]->insertDefault(); 196 | } >> 197 | return 1; 198 | } >> 199 | case StreamingHandleErrorMode::DEAD_LETTER_QUEUE: 200 | { >> 201 | exception_message = e.message(); >> 202 | for (size_t i = 0; i < result_columns.size(); ++i) 203 | { 204 | // We could already push some rows to result_columns before exception, we need to fix it. >> 205 | result_columns[i]->rollback(*checkpoints[i]); 206 | } 207 | >> 208 | is_dead_letter = true; >> 209 | return 0; 210 | } >> 211 | case StreamingHandleErrorMode::DEFAULT: >> 212 | throw std::move(e); 213 | } 214 | }; --- newly covered block 241-244 --- 239 | /// the message stays unacked in RabbitMQ forever. 240 | /// See https://github.com/ClickHouse/ClickHouse/issues/73541 >> 241 | const auto & message = consumer->currentMessage(); >> 242 | commit_info.channel_id = message.channel_id; >> 243 | commit_info.delivery_tag = std::max(commit_info.delivery_tag, message.delivery_tag); >> 244 | throw; 245 | } 246 | } --- newly covered block 269-269 --- 267 | if (exception_message.has_value() && nack_broken_messages) 268 | { >> 269 | commit_info.failed_delivery_tags.push_back(message.delivery_tag); 270 | } 271 | else --- newly covered block 288-296 --- 286 | if (handle_error_mode == StreamingHandleErrorMode::STREAM) 287 | { >> 288 | if (exception_message) 289 | { >> 290 | virtual_columns[7]->insertData(message.message); >> 291 | virtual_columns[8]->insertData(*exception_message); 292 | } 293 | else 294 | { >> 295 | virtual_columns[7]->insertDefault(); >> 296 | virtual_columns[8]->insertDefault(); 297 | } 298 | } --- newly covered block 303-328 --- 301 | if (is_dead_letter) 302 | { >> 303 | chassert(exception_message); >> 304 | const auto time_now = std::chrono::system_clock::now(); >> 305 | auto storage_id = storage.getStorageID(); 306 | >> 307 | auto dead_letter_queue = context->getDeadLetterQueue(); >> 308 | if (!dead_letter_queue) >> 309 | LOG_WARNING(log, "Table system.dead_letter_queue is not configured, skipping message"); 310 | else >> 311 | dead_letter_queue->add( >> 312 | DeadLetterQueueElement{ >> 313 | .table_engine = DeadLetterQueueElement::StreamType::RabbitMQ, >> 314 | .event_time = timeInSeconds(time_now), >> 315 | .event_time_microseconds = timeInMicroseconds(time_now), >> 316 | .database = storage_id.database_name, >> 317 | .table = storage_id.table_name, >> 318 | .raw_message = message.message, >> 319 | .error = exception_message.value(), >> 320 | .details = DeadLetterQueueElement::RabbitMQDetails{ >> 321 | .exchange_name = exchange_name, >> 322 | .message_id = message.message_id, >> 323 | .timestamp = message.timestamp, >> 324 | .redelivered = message.redelivered, >> 325 | .delivery_tag = message.delivery_tag, >> 326 | .channel_id = message.channel_id 327 | } >> 328 | }); 329 | } 330 | --- newly covered block 387-387 --- 385 | bool RabbitMQSource::sendNack() 386 | { >> 387 | return consumer && consumer->nackMessages(commit_info); 388 | } 389 | ================================================================================ src/Backups/BackupEntriesCollector.cpp ================================================================================ --- newly covered block 86-86 --- 84 | String tableNameWithTypeToString(const QualifiedTableName & table_name, bool first_upper) 85 | { >> 86 | return tableNameWithTypeToString(table_name.database, table_name.table, first_upper); 87 | } 88 | --- newly covered block 92-98 --- 90 | std::chrono::milliseconds getSleepTimeAfterInconsistencyError(int attempt_no, unsigned int attempts_before_sleep, std::chrono::milliseconds min_sleep, std::chrono::milliseconds max_sleep) 91 | { >> 92 | attempts_before_sleep = std::max(attempts_before_sleep, 1U); >> 93 | if (((attempt_no + 1) % attempts_before_sleep) != 0) >> 94 | return std::chrono::milliseconds::zero(); /// no sleep 95 | >> 96 | int sleep_counter = attempt_no / attempts_before_sleep; >> 97 | std::chrono::milliseconds sleep_time = intExp2(std::min(sleep_counter, 10)) * min_sleep; >> 98 | return std::min(sleep_time, max_sleep); 99 | } 100 | } --- newly covered block 254-262 --- 252 | if (inconsistency_error) 253 | { >> 254 | auto sleep_time = getSleepTimeAfterInconsistencyError( >> 255 | attempt_no, >> 256 | attempts_to_collect_metadata_before_sleep, >> 257 | min_sleep_before_next_attempt_to_collect_metadata, >> 258 | max_sleep_before_next_attempt_to_collect_metadata); >> 259 | if (sleep_time.count()) 260 | { >> 261 | LOG_TRACE(log, "Sleeping {} before next attempt to collect metadata", to_string(sleep_time)); >> 262 | sleepForMilliseconds(std::chrono::duration_cast(sleep_time).count()); 263 | } 264 | } --- newly covered block 305-305 --- 303 | /// (Because we need to compare with table names from the previous pass to be sure we are not going to miss anything). 304 | if (attempt_no >= 1) >> 305 | inconsistency_error = Exception{ErrorCodes::INCONSISTENT_METADATA_FOR_BACKUP, "{}", mismatch_description}; 306 | need_another_attempt = true; 307 | } --- newly covered block 317-319 --- 315 | { 316 | /// Failed to gather metadata or something wasn't consistent. We'll let other hosts know that and try again. >> 317 | LOG_WARNING(log, "Found inconsistency: {}", inconsistency_error->displayText()); >> 318 | setStage(next_stage, inconsistency_error->displayText()); >> 319 | return; 320 | } 321 | --- newly covered block 332-335 --- 330 | if ((other_host_result != "consistent") && (other_host_result != "need_another_attempt")) 331 | { >> 332 | LOG_WARNING(log, "Found inconsistency on host {}: {}", other_host, other_host_result); >> 333 | inconsistency_error = Exception{ErrorCodes::INCONSISTENT_METADATA_FOR_BACKUP, "Found inconsistency on host {}: {}", other_host, other_host_result}; >> 334 | need_another_attempt = true; >> 335 | return; 336 | } 337 | } --- newly covered block 765-765 --- 763 | if (p_mismatch != previous_metadata.end()) 764 | { >> 765 | return {MismatchType::REMOVED, p_mismatch->first}; 766 | } 767 | --- newly covered block 786-792 --- 784 | if (auto mismatch = find_mismatch(tables_metadata, previous_tables_metadata); mismatch.first != MismatchType::NONE) 785 | { >> 786 | if (mismatch.first == MismatchType::ADDED) >> 787 | mismatch_description = fmt::format("{} was added during scanning", tableNameWithTypeToString(mismatch.second, true)); >> 788 | else if (mismatch.first == MismatchType::REMOVED) >> 789 | mismatch_description = fmt::format("{} was removed during scanning", tableNameWithTypeToString(mismatch.second, true)); 790 | else 791 | mismatch_description = fmt::format("{} changed its definition during scanning", tableNameWithTypeToString(mismatch.second, true)); >> 792 | return false; 793 | } 794 | ================================================================================ src/Storages/RabbitMQ/StorageRabbitMQ.cpp ================================================================================ --- newly covered block 274-275 --- 272 | if (handle_error_mode == StreamingHandleErrorMode::STREAM) 273 | { >> 274 | desc.addEphemeral("_raw_message", std::make_shared(std::make_shared()), "", VirtualsMaterializationPlace::Reader); >> 275 | desc.addEphemeral("_error", std::make_shared(std::make_shared()), "", VirtualsMaterializationPlace::Reader); 276 | } 277 | --- newly covered block 331-331 --- 329 | modified_context->setSetting("input_format_allow_errors_num", (*rabbitmq_settings)[RabbitMQSetting::rabbitmq_skip_broken_messages].value); 330 | else >> 331 | modified_context->setSetting("input_format_allow_errors_num", Field(0)); 332 | 333 | /// Since we are reusing the same context for all queries executed simultaneously, we don't want to used shared `analyze_count` --- newly covered block 400-405 --- 398 | void StorageRabbitMQ::connectionFunc() 399 | { >> 400 | if (initialized) 401 | return; 402 | >> 403 | try 404 | { >> 405 | if (connection->reconnect()) 406 | { 407 | initRabbitMQ(); --- newly covered block 412-417 --- 410 | } 411 | } >> 412 | catch (...) 413 | { 414 | tryLogCurrentException(__PRETTY_FUNCTION__); 415 | } 416 | >> 417 | init_task->scheduleAfter(RESCHEDULE_MS); 418 | } 419 | --- newly covered block 791-791 --- 789 | { 790 | if (!initialized) >> 791 | throw Exception(ErrorCodes::CANNOT_CONNECT_RABBITMQ, "RabbitMQ setup not finished. Connection might be lost"); 792 | 793 | if (num_created_consumers == 0) --- newly covered block 893-894 --- 891 | else 892 | { >> 893 | streaming_task->activate(); >> 894 | init_task->activateAndSchedule(); 895 | } 896 | StreamingStorageRegistry::instance().registerTable(getStorageID()); --- newly covered block 1070-1070 --- 1068 | catch (...) 1069 | { >> 1070 | LOG_ERROR(log, "Error while streaming to views: {}", getCurrentExceptionMessage(true)); 1071 | } 1072 | --- newly covered block 1222-1223 --- 1220 | catch (...) 1221 | { >> 1222 | LOG_ERROR(log, "Failed to push to views. Error: {}", getCurrentExceptionMessage(true)); >> 1223 | write_failed = true; 1224 | } 1225 | --- newly covered block 1298-1299 --- 1296 | if (write_failed) 1297 | { >> 1298 | LOG_TRACE(log, "Write failed, reschedule"); >> 1299 | return true; 1300 | } 1301 | ================================================================================ src/Interpreters/DeadLetterQueue.cpp ================================================================================ --- newly covered block 81-94 --- 79 | void operator()(const DeadLetterQueueElement::RabbitMQDetails & rabbit_mq) const 80 | { >> 81 | i += 4; // skip rows specific for previous details 82 | >> 83 | explicitly_set[i] = true; >> 84 | columns[i++]->insertData(rabbit_mq.exchange_name.data(), rabbit_mq.exchange_name.size()); >> 85 | explicitly_set[i] = true; >> 86 | columns[i++]->insertData(rabbit_mq.message_id.data(), rabbit_mq.message_id.size()); >> 87 | explicitly_set[i] = true; >> 88 | columns[i++]->insert(rabbit_mq.timestamp); >> 89 | explicitly_set[i] = true; >> 90 | columns[i++]->insert(rabbit_mq.redelivered); >> 91 | explicitly_set[i] = true; >> 92 | columns[i++]->insert(rabbit_mq.delivery_tag); >> 93 | explicitly_set[i] = true; >> 94 | columns[i++]->insertData(rabbit_mq.channel_id.data(), rabbit_mq.channel_id.size()); 95 | } 96 | }; ================================================================================ src/Storages/StorageReplicatedMergeTree.cpp ================================================================================ --- newly covered block 3638-3640 --- 3636 | else if (info.parsed_entry->type == LogEntry::GET_PART) 3637 | { >> 3638 | String maybe_covering_drop_range = drop_range_set.getContainingPart(info.parsed_entry->new_part_name); >> 3639 | if (maybe_covering_drop_range.empty()) >> 3640 | get_part_set.add(info.parsed_entry->new_part_name); 3641 | } 3642 | else --- newly covered block 7964-7964 --- 7962 | /// Skip dead replicas. 7963 | if (is_active.error == Coordination::Error::ZNONODE) >> 7964 | continue; 7965 | else if (is_active.error != Coordination::Error::ZOK) 7966 | throw Coordination::Exception::fromPath(is_active.error, is_active_path); --- newly covered block 7988-7988 --- 7986 | } 7987 | >> 7988 | max_replicas_unprocessed_insert_time = std::max(replica_time, max_replicas_unprocessed_insert_time); 7989 | } 7990 | --- newly covered block 7995-7998 --- 7993 | else 7994 | { >> 7995 | max_replicas_unprocessed_insert_time = std::min(current_time, max_replicas_unprocessed_insert_time); >> 7996 | time_t min_replicas_delay = current_time - max_replicas_unprocessed_insert_time; >> 7997 | if (out_absolute_delay > min_replicas_delay) >> 7998 | out_relative_delay = out_absolute_delay - min_replicas_delay; 7999 | } 8000 | } --- newly covered block 8368-8377 --- 8366 | break; 8367 | } >> 8368 | if (rc == Coordination::Error::ZBADVERSION) 8369 | { 8370 | /// Cannot retry automatically, because some zookeeper ops were lost on the first attempt. Will retry on DDLWorker-level. >> 8371 | if (query_context->getZooKeeperMetadataTransaction()) 8372 | throw Exception( 8373 | ErrorCodes::CANNOT_ASSIGN_ALTER, 8374 | "Cannot execute alter, because mutations version was suddenly changed due " 8375 | "to concurrent alter"); >> 8376 | LOG_TRACE(log, "Version conflict when trying to create a mutation node, retrying..."); >> 8377 | continue; 8378 | } 8379 | throw Coordination::Exception::fromMessage(rc, "Unable to create a mutation znode"); ================================================================================ src/Storages/RabbitMQ/RabbitMQConsumer.cpp ================================================================================ --- newly covered block 113-120 --- 111 | for (const auto & delivery_tag : commit_info.failed_delivery_tags) 112 | { >> 113 | if (consumer_channel->reject(delivery_tag)) >> 114 | LOG_TRACE( 115 | log, "Consumer rejected message with deliveryTag {} on channel {}", 116 | delivery_tag, channel_id); 117 | else >> 118 | LOG_WARNING( >> 119 | log, "Failed to reject message with deliveryTag {} on channel {}", >> 120 | delivery_tag, channel_id); 121 | } 122 | --- newly covered block 150-150 --- 148 | bool RabbitMQConsumer::nackMessages(const CommitInfo & commit_info) 149 | { >> 150 | if (state != State::OK) 151 | { 152 | LOG_TEST(log, "State is {}, will not nack messages", magic_enum::enum_name(state.load(std::memory_order_relaxed))); --- newly covered block 157-157 --- 155 | 156 | /// Nothing to nack. >> 157 | if (!commit_info.delivery_tag || commit_info.delivery_tag <= last_commited_delivery_tag) 158 | { 159 | LOG_TEST(log, "Delivery tag is {}, last committed delivery tag: {}, Will not nack messages", --- newly covered block 164-170 --- 162 | } 163 | >> 164 | if (consumer_channel->reject(commit_info.delivery_tag, AMQP::multiple)) 165 | { >> 166 | LOG_TRACE( >> 167 | log, "Consumer rejected messages with deliveryTags from {} to {} on channel {}", >> 168 | last_commited_delivery_tag, commit_info.delivery_tag, channel_id); 169 | >> 170 | return true; 171 | } 172 | ================================================================================ src/Functions/FunctionGenerateRandomStructure.cpp ================================================================================ --- newly covered block 219-232 --- 217 | writeString("FixedString(" + std::to_string(rng() % MAX_FIXEDSTRING_SIZE_WITHOUT_SUSPICIOUS + 1) + ")", buf); 218 | break; >> 219 | case TypeIndex::LowCardinality: >> 220 | writeCString("LowCardinality(", buf); 221 | /// Map key supports only String and FixedString inside LowCardinality. >> 222 | if (rng() % 2) >> 223 | writeCString("String", buf); 224 | else >> 225 | writeString("FixedString(" + std::to_string(rng() % MAX_FIXEDSTRING_SIZE_WITHOUT_SUSPICIOUS + 1) + ")", buf); >> 226 | writeChar(')', buf); >> 227 | break; >> 228 | case TypeIndex::Enum8: >> 229 | writeCString("Enum8(", buf); >> 230 | writeEnumValues(column_name, rng, buf, INT8_MAX); >> 231 | writeChar(')', buf); >> 232 | break; 233 | case TypeIndex::Enum16: 234 | writeCString("Enum16(", buf); ================================================================================ src/Server/DistributedQuery/StreamingExchangeSink.cpp ================================================================================ --- newly covered block 387-387 --- 385 | } 386 | if (received == 0) >> 387 | return false; /// Peer half-closed. 388 | position += received; 389 | } --- newly covered block 419-419 --- 417 | if (!not_eof) 418 | { >> 419 | if (incoming_packet_bytes_filled > 0) 420 | throw Exception(ErrorCodes::UNEXPECTED_PACKET_FROM_CLIENT, 421 | "Peer half-closed exchange stream {} after {} of {} control bytes; truncated control message", --- newly covered block 426-427 --- 424 | /// Normal end-of-stream: after the sink sent the final empty chunk, the source consumes it 425 | /// and closes without sending NoMoreDataNeeded. Treat EOF as benign only with nothing left to send. >> 426 | const size_t unsent = current_send_buffer.size() - current_send_position_in_buffer; >> 427 | if (!final_chunk_added || unsent > 0 || out->count() > 0) 428 | throw Exception(ErrorCodes::UNEXPECTED_PACKET_FROM_CLIENT, 429 | "Peer half-closed exchange stream {} without sending NoMoreDataNeeded " --- newly covered block 433-434 --- 431 | stream_name, final_chunk_added, unsent, out->count()); 432 | >> 433 | LOG_TRACE(log, "Peer closed exchange stream {} after consuming the final chunk", stream_name); >> 434 | markNoMoreDataNeeded(); 435 | } 436 | } --- newly covered block 440-444 --- 438 | void StreamingExchangeSink::markNoMoreDataNeeded() 439 | { >> 440 | no_more_data_needed = true; 441 | /// Drop pending output: consume() drops new chunks too, no more sends will happen. >> 442 | current_send_buffer.clear(); >> 443 | current_send_position_in_buffer = 0; >> 444 | out = std::make_shared(); 445 | } 446 | ================================================================================ src/IO/S3/copyS3File.cpp ================================================================================ --- newly covered block 514-514 --- 512 | } 513 | >> 514 | if (outcome.GetError().GetExceptionName() == "EntityTooLarge" || outcome.GetError().GetExceptionName() == "InvalidRequest") 515 | { 516 | // Can't come here with MinIO, MinIO allows single part upload for large objects. --- newly covered block 528-528 --- 526 | } 527 | >> 528 | if ((outcome.GetError().GetErrorType() == Aws::S3::S3Errors::NO_SUCH_KEY) && (retries < max_retries)) 529 | { 530 | /// For unknown reason, at least MinIO can respond with NO_SUCH_KEY for put requests --- newly covered block 539-546 --- 537 | continue; /// will retry 538 | } >> 539 | ProfileEvents::increment(ProfileEvents::WriteBufferFromS3RequestsErrors, 1); >> 540 | throw S3Exception( >> 541 | outcome.GetError().GetErrorType(), >> 542 | "Message: {}, Key: {}, Bucket: {}, Object size: {}", >> 543 | outcome.GetError().GetMessage(), >> 544 | dest_key, >> 545 | dest_bucket, >> 546 | request.GetContentLength()); 547 | } 548 | } ================================================================================ src/AggregateFunctions/AggregateFunctionQuantileInterpolatedWeighted.cpp ================================================================================ --- newly covered block 331-331 --- 329 | { 330 | if (argument_types.empty()) >> 331 | throw Exception(ErrorCodes::NUMBER_OF_ARGUMENTS_DOESNT_MATCH, "Aggregate function {} requires at least one argument", name); 332 | 333 | const DataTypePtr & argument_type = argument_types[0]; --- 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/Common/ColumnsHashing.h ================================================================================ --- newly covered block 71-72 --- 69 | {} 70 | >> 71 | CachedValuesPtr get(const DictionaryKey & key) { return cache.get(key); } >> 72 | void set(const DictionaryKey & key, const CachedValuesPtr & mapped) { cache.set(key, mapped); } 73 | 74 | private: --- newly covered block 160-162 --- 158 | if (is_shared_dict) 159 | { >> 160 | dictionary_key = {column->getDictionary().getHash(), dict->size()}; 161 | if constexpr (use_cache) >> 162 | cached_values = lcd_cache->get(dictionary_key); 163 | } 164 | --- newly covered block 179-183 --- 177 | if (is_shared_dict) 178 | { >> 179 | cached_values = std::make_shared(); >> 180 | cached_values->saved_hash = saved_hash; >> 181 | cached_values->dictionary_holder = dictionary_holder; 182 | >> 183 | lcd_cache->set(dictionary_key, cached_values); 184 | } 185 | } ================================================================================ src/Storages/MergeTree/ReplicatedMergeTreePartCheckThread.cpp ================================================================================ --- newly covered block 443-446 --- 441 | part_name, (current_time - part->modification_time)); 442 | LOG_INFO(log, message); >> 443 | result.recheck_after_seconds = part->modification_time + MAX_AGE_OF_LOCAL_PART_THAT_WASNT_ADDED_TO_ZOOKEEPER - current_time; >> 444 | result.status = {part_name, true, message}; >> 445 | result.action = ReplicatedCheckResult::RecheckLater; >> 446 | return result; 447 | } 448 | } --- newly covered block 465-471 --- 463 | break; 464 | >> 465 | case ReplicatedCheckResult::RecheckLater: 466 | /// NOTE We cannot enqueue it from the check thread itself >> 467 | if (recheck_after) >> 468 | *recheck_after = result.recheck_after_seconds; 469 | else 470 | enqueuePart(part_name, result.recheck_after_seconds); >> 471 | break; 472 | 473 | case ReplicatedCheckResult::DetachUnexpected: ================================================================================ src/AggregateFunctions/AggregateFunctionQuantileExactWeighted.cpp ================================================================================ --- newly covered block 426-435 --- 424 | if (which.idx == TypeIndex::Decimal64) return std::make_shared>(argument_types, params); 425 | if (which.idx == TypeIndex::Decimal128) return std::make_shared>(argument_types, params); >> 426 | if (which.idx == TypeIndex::Decimal256) return std::make_shared>(argument_types, params); >> 427 | if (which.idx == TypeIndex::DateTime64) return std::make_shared>(argument_types, params); 428 | >> 429 | if (which.idx == TypeIndex::Int128) return std::make_shared>(argument_types, params); >> 430 | if (which.idx == TypeIndex::UInt128) return std::make_shared>(argument_types, params); >> 431 | if (which.idx == TypeIndex::Int256) return std::make_shared>(argument_types, params); >> 432 | if (which.idx == TypeIndex::UInt256) return std::make_shared>(argument_types, params); 433 | >> 434 | throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "Illegal type {} of argument for aggregate function {}", >> 435 | argument_type->getName(), name); 436 | } 437 | ================================================================================ src/Functions/array/FunctionArrayMapped.h ================================================================================ --- newly covered block 185-192 --- 183 | 184 | if (!array_type) >> 185 | throw Exception( >> 186 | ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, >> 187 | "The {}{}{} argument for function {} must be array. Found {} instead", >> 188 | num_fixed_params + 1, >> 189 | getOrdinalSuffix(num_fixed_params + 1), >> 190 | (num_fixed_params == 0 ? " and only" : ""), >> 191 | getName(), >> 192 | arguments[num_fixed_params].type->getName()); 193 | 194 | if constexpr (num_fixed_params) ================================================================================ src/Storages/MutationCommands.cpp ================================================================================ --- newly covered block 218-224 --- 216 | } 217 | >> 218 | const bool metadata_only_modification >> 219 | = ast_col_decl.getDefaultExpression() != nullptr >> 220 | || ast_col_decl.getComment() != nullptr >> 221 | || ast_col_decl.getCodec() != nullptr >> 222 | || ast_col_decl.getTTL() != nullptr; 223 | >> 224 | if (!metadata_only_modification) 225 | throw Exception(ErrorCodes::LOGICAL_ERROR, "MODIFY COLUMN mutation command doesn't specify type: {}", command.formatForErrorMessage()); 226 | } --- newly covered block 279-280 --- 277 | } 278 | >> 279 | res.type = ALTER_WITHOUT_MUTATION; >> 280 | return res; 281 | } 282 | ================================================================================ src/Common/StringUtils.h ================================================================================ --- newly covered block 48-59 --- 46 | std::string getOrdinalSuffix(T n) 47 | { >> 48 | static_assert(std::is_integral_v && std::is_unsigned_v, >> 49 | "Unsigned integer value required"); 50 | >> 51 | const auto last_digit = n % 10; 52 | >> 53 | if ((last_digit < 1 || last_digit > 3) >> 54 | || ((n > 10) && (((n / 10) % 10) == 1))) 55 | return "th"; 56 | >> 57 | switch (last_digit) 58 | { >> 59 | case 1: return "st"; 60 | case 2: return "nd"; 61 | case 3: return "rd"; ================================================================================ src/Storages/RabbitMQ/RabbitMQConnection.cpp ================================================================================ --- newly covered block 47-60 --- 45 | bool RabbitMQConnection::reconnect() 46 | { >> 47 | std::lock_guard lock(mutex); >> 48 | if (isConnectedImpl()) 49 | return true; 50 | >> 51 | disconnectImpl(); 52 | 53 | /// This will force immediate closure if not yet closed >> 54 | if (!connection->closed()) 55 | connection->close(true); 56 | >> 57 | LOG_DEBUG(log, "Trying to restore connection to {}", connectionInfoForLog()); >> 58 | connectImpl(); 59 | >> 60 | return isConnectedImpl(); 61 | } 62 | ================================================================================ src/Processors/Transforms/WindowTransform.cpp ================================================================================ --- newly covered block 1652-1653 --- 1650 | if (parameters_.size() != 1) 1651 | { >> 1652 | throw Exception(ErrorCodes::NUMBER_OF_ARGUMENTS_DOESNT_MATCH, >> 1653 | "Function {} takes exactly one parameter", name_); 1654 | } 1655 | return applyVisitor(FieldVisitorConvertToNumber(), parameters_[0]); --- newly covered block 2436-2438 --- 2434 | if (!isInt64OrUInt64FieldType(argument_types[1]->getDefault().getType())) 2435 | { >> 2436 | throw Exception(ErrorCodes::BAD_ARGUMENTS, >> 2437 | "Offset must be an integer, '{}' given", >> 2438 | argument_types[1]->getName()); 2439 | } 2440 | --- newly covered block 2504-2505 --- 2502 | if (argument_types_.empty()) 2503 | { >> 2504 | throw Exception(ErrorCodes::TOO_FEW_ARGUMENTS_FOR_FUNCTION, >> 2505 | "Function {} takes at least one argument", name_); 2506 | } 2507 | ================================================================================ src/Interpreters/FileCache/FileSegment.cpp ================================================================================ --- newly covered block 280-288 --- 278 | void FileSegment::resetDownloader() 279 | { >> 280 | auto lk = lock(); 281 | >> 282 | SCOPE_EXIT({ cv.notify_all(); }); 283 | >> 284 | assertNotDetachedUnlocked(lk); >> 285 | assertIsDownloaderUnlocked("resetDownloader", lk); 286 | >> 287 | resetDownloadingStateUnlocked(lk); >> 288 | resetDownloaderUnlocked(lk); 289 | } 290 | ================================================================================ src/Analyzer/Resolve/QueryAnalyzer.cpp ================================================================================ --- newly covered block 2889-2894 --- 2887 | size_t arguments_size = lambda_arguments.size(); 2888 | if (lambda_arguments_nodes_size != arguments_size) >> 2889 | throw Exception(ErrorCodes::BAD_ARGUMENTS, >> 2890 | "Lambda {} expect {} arguments. Actual: {}. In scope {}", >> 2891 | lambda_to_resolve.formatASTForErrorMessage(), >> 2892 | lambda_arguments_nodes_size, >> 2893 | arguments_size, >> 2894 | scope.scope_node->formatASTForErrorMessage()); 2895 | 2896 | /// Initialize aliases in lambda scope ================================================================================ src/Functions/FunctionsEmbeddedDictionaries.h ================================================================================ --- newly covered block 247-249 --- 245 | { 246 | if (arguments.size() != 2 && arguments.size() != 3) >> 247 | throw Exception(ErrorCodes::NUMBER_OF_ARGUMENTS_DOESNT_MATCH, >> 248 | "Number of arguments for function {} doesn't match: passed {}, should be 2 or 3.", >> 249 | getName(), arguments.size()); 250 | 251 | if (arguments[0]->getName() != TypeName) --- newly covered block 587-589 --- 585 | 586 | if (arguments[0]->getName() != "UInt32") >> 587 | throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, >> 588 | "Illegal type {} of the first argument of function {} (must be UInt32)", >> 589 | arguments[0]->getName(), getName()); 590 | 591 | if (arguments.size() == 2 && arguments[1]->getName() != "String") ================================================================================ src/Interpreters/Aggregator.cpp ================================================================================ --- newly covered block 1135-1135 --- 1133 | getInlineCountState(emplace_result.getMapped()) = row_end - row_begin; 1134 | else >> 1135 | getInlineCountState(emplace_result.getMapped()) += row_end - row_begin; 1136 | } 1137 | else --- newly covered block 3089-3089 --- 3087 | } 3088 | } >> 3089 | else if (res->without_key) 3090 | { 3091 | mergeDataNoMoreKeysImpl( --- newly covered block 3099-3102 --- 3097 | else 3098 | { >> 3099 | mergeDataOnlyExistingKeysImpl( >> 3100 | getDataVariant(*res).data, >> 3101 | getDataVariant(current).data, >> 3102 | res->aggregates_pool); 3103 | } 3104 | ================================================================================ src/Storages/StorageFuzzJSON.cpp ================================================================================ --- newly covered block 166-171 --- 164 | if (!p.parse(json, document)) 165 | { >> 166 | constexpr size_t max_length = 128LU; >> 167 | throw Exception( >> 168 | ErrorCodes::INCORRECT_DATA, >> 169 | "Failed to parse JSON from the string '{}'{}.", >> 170 | escapeString(json.substr(0, max_length)), >> 171 | json.size() >= max_length ? "... (truncated)" : ""); 172 | } 173 | ================================================================================ src/Functions/structureToFormatSchema.cpp ================================================================================ --- newly covered block 68-72 --- 66 | if (!isString(arguments[0])) 67 | { >> 68 | throw Exception( >> 69 | ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, >> 70 | "Illegal type {} of the first argument of function {}, expected constant string", >> 71 | arguments[0]->getName(), >> 72 | getName()); 73 | } 74 | ================================================================================ src/Server/SSH/SSHPtyHandler.cpp ================================================================================ --- newly covered block 576-581 --- 574 | while (poll(&pfd, 1, 0) > 0 && (pfd.revents & POLLIN)) 575 | { >> 576 | char buf[1024]; >> 577 | int bytes_read = static_cast(read(fd, buf, sizeof(buf))); >> 578 | if (bytes_read <= 0) 579 | break; >> 580 | if (is_stderr) >> 581 | ssh_channel_write_stderr(sdata.channel_callback->channel.getCChannelPtr(), buf, bytes_read); 582 | else 583 | ssh_channel_write(sdata.channel_callback->channel.getCChannelPtr(), buf, bytes_read); ================================================================================ src/Storages/ConstraintsDescription.cpp ================================================================================ --- newly covered block 48-55 --- 46 | return {}; 47 | >> 48 | ConstraintsDescription res; >> 49 | ParserConstraintDeclarationList parser; >> 50 | ASTPtr list = parseQuery(parser, str, 0, DBMS_DEFAULT_MAX_PARSER_DEPTH, DBMS_DEFAULT_MAX_PARSER_BACKTRACKS); 51 | >> 52 | for (const auto & constraint : list->children) 53 | res.constraints.push_back(constraint); 54 | >> 55 | return res; 56 | } 57 | ================================================================================ src/AggregateFunctions/TimeSeries/AggregateFunctionLast2Samples.cpp ================================================================================ --- newly covered block 85-88 --- 83 | { 84 | if (settings && (*settings)[Setting::allow_experimental_time_series_aggregate_functions] == 0) >> 85 | throw Exception( >> 86 | ErrorCodes::UNKNOWN_AGGREGATE_FUNCTION, >> 87 | "Aggregate function {} is experimental and disabled by default. Enable it with setting allow_experimental_time_series_aggregate_functions", >> 88 | name); 89 | 90 | assertBinary(name, argument_types); ================================================================================ 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/IO/parseDateTimeBestEffort.cpp ================================================================================ --- newly covered block 556-559 --- 554 | } 555 | else >> 556 | return on_error( >> 557 | ErrorCodes::CANNOT_PARSE_DATETIME, >> 558 | "Cannot read DateTime: unexpected number of decimal digits after day of month and month: {}", >> 559 | num_digits); 560 | } 561 | } ================================================================================ src/Storages/MaterializedView/RefreshSchedule.cpp ================================================================================ --- newly covered block 32-35 --- 30 | if (t <= prev) 31 | return t; >> 32 | period_start = period.floor(period_start - std::chrono::seconds(1)); >> 33 | t = offset.advance(period_start); >> 34 | chassert(t <= prev); >> 35 | return t; 36 | } 37 | ================================================================================ src/Storages/ObjectStorageQueue/ObjectStorageQueueIFileMetadata.cpp ================================================================================ --- newly covered block 191-193 --- 189 | if (!checkProcessingOwnership(zk_client)) 190 | { >> 191 | LOG_TEST(log, "Will not remove processing node, ownership changed"); >> 192 | code = Coordination::Error::ZOK; >> 193 | return; 194 | } 195 | } --- newly covered block 283-283 --- 281 | /// No retries, because they must be done on a higher level. 282 | if (!zk_client->tryGet(processing_node_path, data)) >> 283 | return false; 284 | 285 | LOG_TEST( ================================================================================ src/Storages/System/StorageSystemStackTrace.cpp ================================================================================ --- newly covered block 197-202 --- 195 | if (poll_res < 0) 196 | { >> 197 | if (errno == EINTR) 198 | { >> 199 | --timeout_ms; /// Quite a hacky way to update timeout. Just to make sure we avoid infinite waiting. >> 200 | if (timeout_ms == 0) 201 | return false; >> 202 | continue; 203 | } 204 | ================================================================================ src/Functions/FunctionsNumericIndexedVector.h ================================================================================ --- newly covered block 627-633 --- 625 | static FunctionPtr create(ContextPtr) { return std::make_shared(); } 626 | >> 627 | String getName() const override { return name; } 628 | >> 629 | bool isVariadic() const override { return false; } 630 | 631 | bool isSuitableForShortCircuitArgumentsExecution(const DataTypesWithConstInfo & /*arguments*/) const override { return true; } 632 | >> 633 | size_t getNumberOfArguments() const override { return 2; } 634 | 635 | DataTypePtr getReturnTypeImpl(const DataTypes & arguments) const override ================================================================================ src/Functions/formatRow.cpp ================================================================================ --- newly covered block 127-127 --- 125 | } 126 | >> 127 | String getName() const override { return function_name; } 128 | bool isVariadic() const override { return true; } 129 | size_t getNumberOfArguments() const override { return 0; } --- newly covered block 136-137 --- 134 | { 135 | if (arguments.size() < 2) >> 136 | throw Exception(ErrorCodes::NUMBER_OF_ARGUMENTS_DOESNT_MATCH, >> 137 | "Function {} requires at least two arguments: the format name and its output expression(s)", getName()); 138 | 139 | Names arguments_column_names; ================================================================================ base/base/BorrowedObjectPool.h ================================================================================ --- newly covered block 80-85 --- 78 | } 79 | >> 80 | bool wait_result = condition_variable.wait_for(lock, std::chrono::milliseconds(timeout_in_milliseconds), [this] { return !objects.empty(); }); 81 | >> 82 | if (wait_result) 83 | dest = borrowFromObjects(lock); 84 | >> 85 | return wait_result; 86 | } 87 | ================================================================================ src/AggregateFunctions/TimeSeries/AggregateFunctionTimeseriesHelpers.cpp ================================================================================ --- newly covered block 66-68 --- 64 | else 65 | { >> 66 | throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, >> 67 | "Illegal type {} of {} parameter for aggregate function {}", >> 68 | parameter_field.getTypeName(), parameter_name, function_name); 69 | } 70 | } ================================================================================ src/Databases/DatabaseReplicated.cpp ================================================================================ --- newly covered block 1968-1971 --- 1966 | break; 1967 | >> 1968 | if (max_log_ptr < new_max_log_ptr) 1969 | { >> 1970 | LOG_DEBUG(log, "Log pointer moved from {} to {}, will retry", max_log_ptr, new_max_log_ptr); >> 1971 | max_log_ptr = new_max_log_ptr; 1972 | } 1973 | else ================================================================================ src/Functions/FunctionsExternalDictionaries.h ================================================================================ --- newly covered block 190-192 --- 188 | { 189 | if (arguments.size() < 2) >> 190 | throw Exception(ErrorCodes::NUMBER_OF_ARGUMENTS_DOESNT_MATCH, >> 191 | "Wrong argument count for function {}", >> 192 | getName()); 193 | 194 | if (!isString(arguments[0])) ================================================================================ src/Functions/HasSubsequenceImpl.h ================================================================================ --- newly covered block 48-50 --- 46 | 47 | if (!isString(arguments[1])) >> 48 | throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, >> 49 | "Illegal type {} of argument of function {}", >> 50 | arguments[1]->getName(), getName()); 51 | 52 | return std::make_shared>(); ================================================================================ 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/arrayEnumerateExtended.h ================================================================================ --- newly covered block 53-55 --- 51 | const DataTypeArray * array_type = checkAndGetDataType(arguments[i].get()); 52 | if (!array_type) >> 53 | throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, >> 54 | "All arguments for function {} must be arrays but argument {} has type {}.", >> 55 | getName(), i + 1, arguments[i]->getName()); 56 | } 57 | ================================================================================ src/Functions/array/arraySlice.cpp ================================================================================ --- newly covered block 60-62 --- 58 | const auto * array_type = typeid_cast(arguments[0].get()); 59 | if (!array_type) >> 60 | throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, >> 61 | "First argument for function {} must be an array but it has type {}.", >> 62 | getName(), arguments[0]->getName()); 63 | 64 | for (size_t i = 1; i < number_of_arguments; ++i) ================================================================================ src/Functions/isDecimalOverflow.cpp ================================================================================ --- newly covered block 46-48 --- 44 | { 45 | if (arguments.empty() || arguments.size() > 2) >> 46 | throw Exception(ErrorCodes::NUMBER_OF_ARGUMENTS_DOESNT_MATCH, >> 47 | "Number of arguments for function {} doesn't match: passed {}, should be 1 or 2.", >> 48 | getName(), arguments.size()); 49 | 50 | WhichDataType which_first(arguments[0]->getTypeId()); ================================================================================ src/Interpreters/ClusterDiscovery.cpp ================================================================================ --- newly covered block 789-792 --- 787 | else 788 | { >> 789 | all_up_to_date = false; 790 | /// no need to trigger convar, will retry after timeout in `wait` >> 791 | clusters_to_update->set(cluster_name); >> 792 | LOG_WARNING(log, "Dynamic cluster '{}' wasn't inserted, will retry", cluster_name); 793 | } 794 | } ================================================================================ src/Server/StatelessWorker/StatelessWorkerEndpoint.cpp ================================================================================ --- newly covered block 322-324 --- 320 | else 321 | { >> 322 | body->eof(); >> 323 | body.reset(); >> 324 | LOG_WARNING(log, "Unsupported operation '{}'", operation); 325 | response.setStatus(Poco::Net::HTTPResponse::HTTP_BAD_REQUEST); 326 | writeString("Unknown operation type\n", out); ================================================================================ src/Storages/MergeTree/Compaction/MergePredicates/ReplicatedMergeTreeMergePredicate.cpp ================================================================================ --- newly covered block 270-270 --- 268 | /// Maybe we already know that there are no relevant uncommitted blocks 269 | if (checked_partitions_cache.contains(partition_id)) >> 270 | continue; 271 | 272 | if (partition_ids_hint && !partition_ids_hint->contains(partition_id)) --- newly covered block 310-311 --- 308 | return true; 309 | >> 310 | LOG_TRACE(queue.log, "Mutation {} is not done because some parts [{}] were just committed", znode_name, fmt::join(it->second.parts_to_do.getParts(), ", ")); >> 311 | return false; 312 | } 313 | ================================================================================ src/TableFunctions/TableFunctionGenerateRandom.cpp ================================================================================ --- newly covered block 98-100 --- 96 | if (!arg_raw->as()) 97 | { >> 98 | throw Exception(ErrorCodes::BAD_ARGUMENTS, >> 99 | "All arguments of table function '{}' except structure argument must be literals. " >> 100 | "Got '{}' instead", getName(), arg->formatForErrorMessage()); 101 | } 102 | } ================================================================================ src/Storages/RabbitMQ/StorageRabbitMQ.h ================================================================================ --- newly covered block 38-38 --- 36 | std::string getName() const override { return RabbitMQ::TABLE_ENGINE_NAME; } 37 | >> 38 | bool isMessageQueue() const override { return true; } 39 | 40 | bool noPushingToViewsOnInserts() const override { return true; } --- newly covered block 88-88 --- 86 | void decrementReader(); 87 | >> 88 | bool supportsColumnsWithDynamicStructure() const override { return true; } 89 | bool supportsSubcolumns() const override { return true; } 90 | ================================================================================ src/Disks/DiskObjectStorage/DiskObjectStorageTransaction.cpp ================================================================================ --- newly covered block 191-192 --- 189 | tx->removeRecursive(path, /*should_remove_objects=*/[keep_all_shared_data, file_names_remove_metadata_only](const std::string & relative_path) 190 | { >> 191 | return !keep_all_shared_data && !file_names_remove_metadata_only.contains(relative_path); >> 192 | }); 193 | }); 194 | } ================================================================================ base/base/chrono_io.h ================================================================================ --- newly covered block 24-25 --- 22 | if (seconds_as_int == duration) 23 | return std::to_string(seconds_as_int.count()) + "s"; >> 24 | auto seconds_as_double = std::chrono::duration_cast>(duration); >> 25 | return std::to_string(seconds_as_double.count()) + "s"; 26 | } 27 | ================================================================================ src/AggregateFunctions/AggregateFunctionDeltaSum.cpp ================================================================================ --- newly covered block 151-152 --- 149 | return AggregateFunctionPtr(createWithNumericType( 150 | *data_type, arguments, params)); >> 151 | throw Exception( >> 152 | ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "Illegal type {} of argument for aggregate function {}", arguments[0]->getName(), name); 153 | } 154 | } ================================================================================ src/AggregateFunctions/AggregateFunctionGroupUniqArray.cpp ================================================================================ --- newly covered block 329-330 --- 327 | } 328 | else >> 329 | throw Exception(ErrorCodes::NUMBER_OF_ARGUMENTS_DOESNT_MATCH, >> 330 | "Incorrect number of parameters for aggregate function {}, should be 0 or 1", name); 331 | 332 | if (!limit_size) ================================================================================ src/AggregateFunctions/AggregateFunctionQuantileBFloat16Weighted.cpp ================================================================================ --- newly covered block 42-43 --- 40 | if (which.idx == TypeIndex::DateTime) return std::make_shared>(argument_types, params); 41 | >> 42 | throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "Illegal type {} of argument for aggregate function {}", >> 43 | argument_type->getName(), name); 44 | } 45 | ================================================================================ src/Common/Scheduler/Nodes/CustomResourceManager.cpp ================================================================================ --- newly covered block 175-178 --- 173 | if (auto iter = resources.find(resource_name); iter != resources.end()) 174 | return iter->second; >> 175 | if (settings.throw_on_unknown_workload) 176 | throw Exception(ErrorCodes::RESOURCE_ACCESS_DENIED, "Access denied to resource '{}'", resource_name); 177 | else >> 178 | return ResourceLink{}; // unlimited access 179 | } 180 | ================================================================================ src/Common/Scheduler/Nodes/WorkloadResourceManager.cpp ================================================================================ --- newly covered block 425-428 --- 423 | else 424 | { >> 425 | if (settings.throw_on_unknown_workload) 426 | throw Exception(ErrorCodes::RESOURCE_NOT_FOUND, "Access denied to resource '{}'", resource_name); 427 | else >> 428 | return ResourceLink{}; // unlimited access 429 | } 430 | } ================================================================================ src/DataTypes/Serializations/SerializationObjectSharedData.cpp ================================================================================ --- newly covered block 161-161 --- 159 | { 160 | /// If we add new serialization version in future and forget to implement something, better to get an exception instead of doing nothing. >> 161 | throw Exception(ErrorCodes::NOT_IMPLEMENTED, "enumerateStreams is not implemented for shared data serialization version {}", serialization_version.value); 162 | } 163 | --- newly covered block 1409-1409 --- 1407 | { 1408 | /// If we add new serialization version in future and forget to implement something, better to get an exception instead of doing nothing. >> 1409 | throw Exception(ErrorCodes::NOT_IMPLEMENTED, "deserializeBinaryBulkStatePrefix is not implemented for shared data serialization version {}", serialization_version.value); 1410 | } 1411 | } ================================================================================ src/Disks/IO/CachedOnDiskReadBufferFromFile.cpp ================================================================================ --- newly covered block 515-516 --- 513 | /// offset 514 | >> 515 | file_segment.resetDownloader(); >> 516 | return create(ReadType::CACHED); 517 | } 518 | ================================================================================ src/Formats/JSONUtils.cpp ================================================================================ --- newly covered block 762-762 --- 760 | name_and_type = {first_field_and_value.second, type}; 761 | } >> 762 | else if (second_field_and_value.first == "name" && first_field_and_value.first == "type") 763 | { 764 | auto type = DataTypeFactory::instance().tryGet(first_field_and_value.second); --- newly covered block 771-771 --- 769 | else 770 | { >> 771 | return false; 772 | } 773 | ================================================================================ src/Functions/FunctionDateOrDateTimeAddInterval.h ================================================================================ --- newly covered block 809-810 --- 807 | { 808 | if (!isDateOrDate32OrTimeOrTime64OrDateTimeOrDateTime64(arguments[0].type) && !isString(arguments[0].type)) >> 809 | throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "Illegal type {} of first argument of function {}. " >> 810 | "Must be a date, a date with time or a String", arguments[0].type->getName(), getName()); 811 | } 812 | 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 | ================================================================================ 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/FunctionsStringHashFixedString.cpp ================================================================================ --- newly covered block 246-247 --- 244 | { 245 | if (!isStringOrFixedString(arguments[0]) && !isIPv6(arguments[0])) >> 246 | throw Exception( >> 247 | ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "Illegal type {} of argument of function {}", arguments[0]->getName(), getName()); 248 | 249 | return std::make_shared(Impl::length); ================================================================================ src/Functions/TimeSeries/TimeSeriesTagsFunctionHelpers.cpp ================================================================================ --- newly covered block 417-418 --- 415 | 416 | if (!isUInt64(nested_type)) >> 417 | throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "Argument #{} of function {} has wrong type {}, it must be {}", >> 418 | argument_index + 1, function_name, type, "UInt64"); 419 | } 420 | ================================================================================ src/Functions/addressToLine.h ================================================================================ --- newly covered block 48-49 --- 46 | 47 | if (!WhichDataType(type.get()).isUInt64()) >> 48 | throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "The only argument for function {} must be UInt64. " >> 49 | "Found {} instead.", getName(), type->getName()); 50 | 51 | return getDataType(); ================================================================================ src/Functions/array/arrayElement.cpp ================================================================================ --- newly covered block 1228-1228 --- 1226 | col_nested_elem = checkAndGetColumn(&col_nested_array->getData()); 1227 | else >> 1228 | col_nested_elem = checkAndGetColumn(col_nullable->getNestedColumnPtr().get()); 1229 | 1230 | if (!col_nested_elem) --- newly covered block 1243-1243 --- 1241 | res_data = typeid_cast(&res_array->getData()); 1242 | else >> 1243 | res_data = typeid_cast(&res_nullable->getNestedColumn()); 1244 | 1245 | const NullMap * null_map = col_nullable ? &col_nullable->getNullMapData() : nullptr; ================================================================================ src/Functions/map.cpp ================================================================================ --- newly covered block 90-91 --- 88 | { 89 | if (arguments.size() % 2 != 0) >> 90 | throw Exception(ErrorCodes::NUMBER_OF_ARGUMENTS_DOESNT_MATCH, >> 91 | "Function {} requires even number of arguments, but {} given", getName(), arguments.size()); 92 | 93 | DataTypes keys; ================================================================================ src/Functions/substring.cpp ================================================================================ --- newly covered block 52-53 --- 50 | 51 | if (number_of_arguments < 2 || number_of_arguments > 3) >> 52 | throw Exception(ErrorCodes::NUMBER_OF_ARGUMENTS_DOESNT_MATCH, "Number of arguments for function {} doesn't match: " >> 53 | "passed {}, should be 2 or 3", getName(), number_of_arguments); 54 | 55 | if (is_utf8) ================================================================================ src/Functions/validateNestedArraySizes.cpp ================================================================================ --- newly covered block 43-44 --- 41 | 42 | if (num_args < 3) >> 43 | throw Exception(ErrorCodes::NUMBER_OF_ARGUMENTS_DOESNT_MATCH, "Function {} needs more than two arguments; passed {}.", >> 44 | getName(), arguments.size()); 45 | 46 | if (!WhichDataType(arguments[0]).isUInt8()) ================================================================================ src/Functions/vectorFunctions.cpp ================================================================================ --- newly covered block 937-938 --- 935 | 936 | if (!cur_tuple) >> 937 | throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "Argument 0 of function {} should be tuple, got {}", >> 938 | getName(), arguments[0].type->getName()); 939 | 940 | const auto & cur_types = cur_tuple->getElements(); ================================================================================ src/IO/S3/PocoHTTPClient.cpp ================================================================================ --- newly covered block 764-765 --- 762 | catch (Poco::IOException &) 763 | { >> 764 | LOG_DEBUG(log, "Failed to make request to: {}: will be retried, Poco::IOException: {}", uri, getCurrentExceptionMessage(/* with_stacktrace */ true)); >> 765 | exception_handler(Aws::Client::CoreErrors::NETWORK_CONNECTION); 766 | } 767 | catch (Poco::TimeoutException &) ================================================================================ src/Interpreters/ActionsDAG.cpp ================================================================================ --- newly covered block 1875-1875 --- 1873 | res_elem.name); 1874 | } >> 1875 | else if (columns_contain_compiled_function && columns_contain_compiled_function->contains(res_elem.name)) 1876 | { 1877 | /// It may happen when JIT compilation is enabled that source column is constant and destination column is not constant. --- newly covered block 1882-1882 --- 1880 | /// It causes inconsistency between pipeline header(source column is not constant) and output header of ExpressionStep(destination column is constant). 1881 | /// So we need to convert non-constant column to constant column under this condition. >> 1882 | dst_node = &actions_dag.addColumn(res_const->getPtr(), res_elem.type, res_elem.name); 1883 | } 1884 | else ================================================================================ src/Parsers/CreateQueryUUIDs.cpp ================================================================================ --- newly covered block 175-176 --- 173 | else 174 | { >> 175 | ViewTarget::Kind kind = parseViewTargetKindFromString(name); >> 176 | res.setTargetInnerUUID(kind, parse(value)); 177 | } 178 | if (in.peek(c) && c == ',') ================================================================================ src/Processors/QueryPlan/ExpressionStep.cpp ================================================================================ --- newly covered block 42-42 --- 40 | { 41 | if (node->type == ActionsDAG::ActionType::FUNCTION && node->is_function_compiled) >> 42 | return true; 43 | 44 | const auto & children = node->children; --- newly covered block 61-61 --- 59 | if (containsCompiledFunction(node)) 60 | { >> 61 | result.insert(node->result_name); 62 | } 63 | } ================================================================================ src/Processors/Transforms/MergeJoinTransform.cpp ================================================================================ --- newly covered block 947-951 --- 945 | auto & current_left = cursors[0]; 946 | if (!current_left.isValid()) >> 947 | return Status(0); 948 | 949 | auto & current_right = cursors[1]; 950 | if (!current_right.isValid()) >> 951 | return Status(1); 952 | 953 | /// join doesn't build result block, but returns indices where result rows should be placed ================================================================================ src/Server/KeeperTCPHandler.cpp ================================================================================ --- newly covered block 636-637 --- 634 | catch (...) 635 | { >> 636 | maybe_finalize_opentelemetry_span(OpenTelemetry::SpanStatus::ERROR, getCurrentExceptionMessage(true)); >> 637 | throw; 638 | } 639 | ================================================================================ src/Storages/IMessageProducer.cpp ================================================================================ --- newly covered block 23-24 --- 21 | catch (...) 22 | { >> 23 | finished = true; >> 24 | throw; 25 | } 26 | ================================================================================ src/Storages/Kafka/StorageKafka2.cpp ================================================================================ --- newly covered block 1052-1053 --- 1050 | else 1051 | { >> 1052 | virtual_columns[4]->insertDefault(); >> 1053 | virtual_columns[5]->insertDefault(); 1054 | } 1055 | virtual_columns[6]->insert(headers_names); ================================================================================ src/Storages/ObjectStorage/DataLakes/Iceberg/IcebergPath.cpp ================================================================================ --- newly covered block 87-87 --- 85 | return std::string{raw_path.substr(good_pos)}; 86 | } >> 87 | else if (pos != std::string::npos) 88 | { 89 | return std::string{raw_path.substr(pos)}; --- newly covered block 93-93 --- 91 | else 92 | { >> 93 | throw ::DB::Exception(DB::ErrorCodes::BAD_ARGUMENTS, "Expected to find '{}' in data path: '{}'", table_root, raw_path); 94 | } 95 | } ================================================================================ src/Storages/ObjectStorage/DataLakes/Iceberg/Utils.cpp ================================================================================ --- newly covered block 1202-1202 --- 1200 | auto explicit_metadata_path = data_lake_settings[DataLakeStorageSetting::iceberg_metadata_file_path].value; 1201 | if (explicit_metadata_path.find('\0') != String::npos) >> 1202 | throw Exception(ErrorCodes::BAD_ARGUMENTS, "Iceberg metadata file path contains a null byte"); 1203 | LOG_TEST(log, "Explicit metadata file path is specified {}, will read from this metadata file", explicit_metadata_path); 1204 | std::filesystem::path p(explicit_metadata_path); --- newly covered block 1209-1209 --- 1207 | { 1208 | if (*it == "." || *it == "..") >> 1209 | throw Exception(ErrorCodes::BAD_ARGUMENTS, "Relative paths are not allowed"); 1210 | } 1211 | String resolved_path = resolvePathInsideTable(table_path, explicit_metadata_path); ================================================================================ src/Storages/ObjectStorageQueue/ObjectStorageQueueMetadata.cpp ================================================================================ --- newly covered block 1584-1585 --- 1582 | if (code == Coordination::Error::ZOK) 1583 | ++removed; >> 1584 | else if (code == Coordination::Error::ZNONODE || code == Coordination::Error::ZBADVERSION) >> 1585 | LOG_TRACE(log, "Processing node {} was already removed or recreated, skipping", node); 1586 | else 1587 | throw zkutil::KeeperException::fromPath(code, node); ================================================================================ src/Storages/ObjectStorageQueue/ObjectStorageQueueSource.cpp ================================================================================ --- newly covered block 319-320 --- 317 | if (processing_paths_responses[i].data != processor_info) 318 | { >> 319 | failed = true; >> 320 | break; 321 | } 322 | } ================================================================================ src/Storages/ObjectStorageQueue/ObjectStorageQueueUnorderedFileMetadata.cpp ================================================================================ --- newly covered block 118-120 --- 116 | return {false, FileStatus::State::Processing}; 117 | >> 118 | throw Exception( 119 | ErrorCodes::LOGICAL_ERROR, >> 120 | "Failed to set file processing, last error: {}", code); 121 | } 122 | ================================================================================ src/Storages/System/StorageSystemParts.cpp ================================================================================ --- newly covered block 34-35 --- 32 | case DB::DataPartRemovalState::HAS_SKIPPED_MUTATION_PARENT: 33 | return "Waiting mutation parent to be removed"; >> 34 | case DB::DataPartRemovalState::EMPTY_PART_COVERS_OTHER_PARTS: >> 35 | return "Waiting for covered parts to be removed first"; 36 | case DB::DataPartRemovalState::REMOVE: 37 | return "Part was selected to be removed"; ================================================================================ src/Storages/System/StorageSystemZooKeeper.cpp ================================================================================ --- newly covered block 771-771 --- 769 | auto & res = get_responses[i]; 770 | if (res.error == Coordination::Error::ZNONODE) >> 771 | continue; /// Node was deleted meanwhile. 772 | children_count += res.stat.numChildren; 773 | } --- newly covered block 780-780 --- 778 | auto & res = get_responses[i]; 779 | if (res.error == Coordination::Error::ZNONODE) >> 780 | continue; /// Node was deleted meanwhile. 781 | 782 | auto & get_task = get_tasks[i]; ================================================================================ src/Storages/RabbitMQ/RabbitMQ_fwd.h ================================================================================ --- newly covered block 10-10 --- 8 | 9 | static constexpr auto TABLE_ENGINE_NAME = "RabbitMQ"; >> 10 | static constexpr auto DEFAULT_MASKING_RULE = [](const DB::Field &){ return "'[HIDDEN]'"; }; 11 | 12 | using ValueMaskingFunc = std::function; ================================================================================ src/AggregateFunctions/AggregateFunctionAggThrow.cpp ================================================================================ --- newly covered block 105-105 --- 103 | void insertResultInto(AggregateDataPtr __restrict, IColumn & to, Arena *) const override 104 | { >> 105 | to.insertDefault(); 106 | } 107 | }; ================================================================================ src/Columns/ColumnReplicated.h ================================================================================ --- newly covered block 62-62 --- 60 | bool isReplicated() const override { return true; } 61 | const char * getFamilyName() const override { return "Replicated"; } >> 62 | std::string getName() const override { return "Replicated(" + nested_column->getName() + ")"; } 63 | TypeIndex getDataType() const override { return nested_column->getDataType(); } 64 | MutableColumnPtr cloneResized(size_t new_size) const override; ================================================================================ src/Functions/ifNull.cpp ================================================================================ --- newly covered block 52-52 --- 50 | bool useDefaultImplementationForNulls() const override { return false; } 51 | bool useDefaultImplementationForConstants() const override { return true; } >> 52 | bool isSuitableForShortCircuitArgumentsExecution(const DataTypesWithConstInfo & /*arguments*/) const override { return false; } 53 | ColumnNumbers getArgumentsThatDontImplyNullableReturnType(size_t /*number_of_arguments*/) const override { return {0}; } 54 | ================================================================================ src/Functions/reverse.cpp ================================================================================ --- newly covered block 129-129 --- 127 | } 128 | >> 129 | String getName() const override { return name; } 130 | size_t getNumberOfArguments() const override { return 1; } 131 | ================================================================================ src/Functions/toTimezone.cpp ================================================================================ --- newly covered block 92-92 --- 90 | static constexpr auto name = "toTimezone"; 91 | >> 92 | String getName() const override { return name; } 93 | 94 | size_t getNumberOfArguments() const override { return 2; } ================================================================================ src/Storages/MessageQueueSink.cpp ================================================================================ --- newly covered block 101-101 --- 99 | void MessageQueueSink::onException(std::exception_ptr /* exception */) 100 | { >> 101 | onFinish(); 102 | } 103 | ================================================================================ programs/server/Server.cpp ================================================================================ --- newly covered block 1799-1799 --- 1797 | if (stored_binary_hash.empty()) 1798 | { >> 1799 | LOG_WARNING(log, "Integrity check of the executable skipped because the reference checksum could not be read."); 1800 | } 1801 | else ================================================================================ src/AggregateFunctions/AggregateFunctionGroupArrayIntersect.cpp ================================================================================ --- newly covered block 95-95 --- 93 | typename State::Set::LookupResult set_value = set.find(static_cast((*data_column)[offset + i].safeGet())); 94 | if (set_value != nullptr) >> 95 | new_set.insert(static_cast((*data_column)[offset + i].safeGet())); 96 | } 97 | set = std::move(new_set); ================================================================================ src/AggregateFunctions/AggregateFunctionKolmogorovSmirnovTest.cpp ================================================================================ --- newly covered block 347-347 --- 345 | 346 | if (!isNumber(argument_types[0]) || !isNumber(argument_types[1])) >> 347 | throw Exception(ErrorCodes::NOT_IMPLEMENTED, "Aggregate function {} only supports numerical types", name); 348 | 349 | return std::make_shared(argument_types, parameters); ================================================================================ 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]; ================================================================================ src/AggregateFunctions/AggregateFunctionQuantileExactLow.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/AggregateFunctions/AggregateFunctionQuantileGK.cpp ================================================================================ --- newly covered block 510-510 --- 508 | { 509 | if (argument_types.empty()) >> 510 | throw Exception(ErrorCodes::NUMBER_OF_ARGUMENTS_DOESNT_MATCH, "Aggregate function {} requires at least one argument", name); 511 | 512 | const DataTypePtr & argument_type = argument_types[0]; ================================================================================ src/AggregateFunctions/AggregateFunctionUniqCombined.cpp ================================================================================ --- newly covered block 37-37 --- 35 | 36 | if (argument_types.empty()) >> 37 | throw Exception(ErrorCodes::NUMBER_OF_ARGUMENTS_DOESNT_MATCH, "Incorrect number of arguments for aggregate function {}", name); 38 | 39 | switch (precision) // NOLINT(bugprone-switch-missing-default-case) ================================================================================ src/AggregateFunctions/AggregateFunctionVarianceMatrix.cpp ================================================================================ --- newly covered block 171-171 --- 169 | for (const auto & argument_type : argument_types) 170 | if (!isNativeNumber(argument_type)) >> 171 | throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "Aggregate function {} only supports numerical types", name); 172 | 173 | return std::make_shared(argument_types); ================================================================================ src/Backups/BackupCoordinationReplicatedTables.cpp ================================================================================ --- newly covered block 79-79 --- 77 | const auto & part = last_it->second; 78 | if (part.info.min_block > new_max_block) >> 79 | break; 80 | if (!new_part_info.contains(part.info)) 81 | { ================================================================================ src/Columns/ColumnObject.cpp ================================================================================ --- newly covered block 1623-1623 --- 1621 | { 1622 | if (source_columns.empty()) >> 1623 | return; 1624 | 1625 | /// Dynamic paths of source Object columns may differ. ================================================================================ src/Common/AsyncLoader.cpp ================================================================================ --- newly covered block 283-283 --- 281 | 282 | for (const auto & [job, _] : scheduled_jobs) >> 283 | jobs.insert(job); 284 | } 285 | ================================================================================ 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/UDFProcessSubtreeSampler.cpp ================================================================================ --- newly covered block 87-87 --- 85 | std::ifstream in(children_path); 86 | if (!in.is_open()) >> 87 | continue; 88 | 89 | pid_t child = 0; ================================================================================ src/Coordination/KeeperSnapshotManager.cpp ================================================================================ --- newly covered block 210-210 --- 208 | node.acl_id = 0; 209 | } >> 210 | else if (version == SnapshotVersion::V0) 211 | { 212 | /// Deserialize ACL ================================================================================ src/Coordination/RocksDBContainer.h ================================================================================ --- newly covered block 313-313 --- 311 | } 312 | >> 313 | throw Exception(ErrorCodes::ROCKSDB_ERROR, "Got rocksdb error during insert. The error message is {}.", status.ToString()); 314 | } 315 | ================================================================================ src/Core/QualifiedTableName.cpp ================================================================================ --- newly covered block 40-40 --- 38 | { 39 | if (maybe_qualified_name.empty()) >> 40 | return {}; 41 | 42 | /// Do not allow dot at the beginning and at the end ================================================================================ src/Databases/DDLDependencyVisitor.cpp ================================================================================ --- newly covered block 543-543 --- 541 | return cluster_name; 542 | >> 543 | return tryGetStringFromArgument(function, arg_idx); 544 | } 545 | }; ================================================================================ src/Dictionaries/LibraryDictionarySource.cpp ================================================================================ --- newly covered block 52-52 --- 50 | auto dictionaries_lib_path = context->getDictionariesLibPath(); 51 | if (created_from_ddl && !fileOrSymlinkPathStartsWith(path, dictionaries_lib_path)) >> 52 | throw Exception(ErrorCodes::PATH_ACCESS_DENIED, "File path {} is not inside {}", path, dictionaries_lib_path); 53 | 54 | namespace fs = std::filesystem; ================================================================================ src/Functions/FunctionsBitToArray.cpp ================================================================================ --- newly covered block 56-56 --- 54 | 55 | if (!isInteger(type)) >> 56 | throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "Cannot format {} as bitmask string", type->getName()); 57 | 58 | return std::make_shared(); ================================================================================ src/Functions/FunctionsConversion.h ================================================================================ --- newly covered block 3726-3726 --- 3724 | } 3725 | >> 3726 | return nullptr; 3727 | } 3728 | ================================================================================ src/Functions/FunctionsHashing.h ================================================================================ --- newly covered block 585-585 --- 583 | 584 | if (size % 2 != 0) >> 585 | throw Exception(ErrorCodes::BAD_ARGUMENTS, "Arguments for javaHashUTF16LE must be in the form of UTF-16"); 586 | 587 | UInt32 h = 0; ================================================================================ src/Functions/if.cpp ================================================================================ --- newly covered block 673-673 --- 671 | col2_contents = convertConstTupleToConstantElements(*const_tuple); 672 | else >> 673 | return nullptr; 674 | 675 | const DataTypeTuple & type1 = static_cast(*arg1.type); ================================================================================ src/Functions/normalizedQueryHash.cpp ================================================================================ --- newly covered block 65-65 --- 63 | { 64 | if (!isString(arguments[0])) >> 65 | throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "Illegal type {} of argument of function {}", arguments[0]->getName(), getName()); 66 | 67 | return std::make_shared(); ================================================================================ src/Functions/patchPartitionID.cpp ================================================================================ --- newly covered block 40-40 --- 38 | { 39 | if (!isString(arguments[0]) || !isString(arguments[1])) >> 40 | throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "The arguments of function {} must be 2 strings", name); 41 | 42 | return std::make_shared(); ================================================================================ src/Functions/pointInPolygon.cpp ================================================================================ --- newly covered block 143-143 --- 141 | if (arguments.size() < 2) 142 | { >> 143 | throw Exception(ErrorCodes::TOO_FEW_ARGUMENTS_FOR_FUNCTION, "Function {} requires at least 2 arguments", getName()); 144 | } 145 | ================================================================================ src/Functions/toStartOfInterval.cpp ================================================================================ --- newly covered block 153-153 --- 151 | static_cast(scale)); 152 | } >> 153 | throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "Illegal column for 1st argument of function {}, expected a Date, Date32, DateTime or DateTime64", getName()); 154 | } 155 | ================================================================================ src/IO/PeekableReadBuffer.cpp ================================================================================ --- newly covered block 85-85 --- 83 | pos_offset = bytes_to_copy; 84 | else >> 85 | pos_offset = 0; 86 | } 87 | BufferBase::set(memory_data, peeked_size + bytes_to_copy, pos_offset); ================================================================================ src/Interpreters/ActionsVisitor.cpp ================================================================================ --- newly covered block 718-718 --- 716 | { 717 | if (node.arguments->children.size() != 1) >> 718 | throw Exception(ErrorCodes::TYPE_MISMATCH, "arrayJoin requires exactly 1 argument"); 719 | checkFunctionHasEmptyNullsAction(node); 720 | ================================================================================ src/Interpreters/ArrayJoinAction.cpp ================================================================================ --- newly covered block 45-45 --- 43 | if (const auto * map = typeid_cast(column.get())) 44 | return map->getNestedColumnPtr(); >> 45 | return nullptr; 46 | } 47 | ================================================================================ src/Interpreters/BloomFilterHash.h ================================================================================ --- newly covered block 51-51 --- 49 | } 50 | >> 51 | return CityHash_v1_0_2::CityHash64("", 0); 52 | } 53 | ================================================================================ src/Interpreters/ExternalDictionariesLoader.cpp ================================================================================ --- newly covered block 218-218 --- 216 | auto qualified_name = QualifiedTableName::tryParseFromString(name); 217 | if (!qualified_name) >> 218 | return res; 219 | 220 | if (qualified_name->database.empty()) ================================================================================ src/Interpreters/FileCache/FileCache.cpp ================================================================================ --- newly covered block 760-760 --- 758 | 759 | if (is_limit_reached()) >> 760 | erase_unprocessed(); 761 | } 762 | } ================================================================================ src/Interpreters/FileCache/Metadata.cpp ================================================================================ --- newly covered block 678-678 --- 676 | auto it = bucket.find(key); 677 | if (it == bucket.end()) >> 678 | continue; 679 | 680 | auto locked_key = it->second->lockNoStateCheck(); ================================================================================ src/Interpreters/InsertDependenciesBuilder.cpp ================================================================================ --- newly covered block 1707-1707 --- 1705 | ++it; 1706 | } >> 1707 | else if (it == path.begin()) 1708 | ++it; 1709 | ================================================================================ src/Parsers/ExpressionListParsers.cpp ================================================================================ --- newly covered block 2352-2352 --- 2350 | { 2351 | if (!mergeElement()) >> 2352 | return false; 2353 | 2354 | if (noop) ================================================================================ src/Planner/PlannerJoinTree.cpp ================================================================================ --- newly covered block 497-497 --- 495 | { 496 | throw Exception(ErrorCodes::LOGICAL_ERROR, "Expected table, table function, query or union. Actual {}", >> 497 | table_expression->formatASTForErrorMessage()); 498 | } 499 | ================================================================================ src/Processors/Formats/Impl/Parquet/Decoding.cpp ================================================================================ --- newly covered block 1048-1048 --- 1046 | string_converter->convertField(data, is_max, out); 1047 | else >> 1048 | chassert(false); 1049 | } 1050 | ================================================================================ src/Processors/QueryPlan/Optimizations/optimizeLazyMaterialization.cpp ================================================================================ --- newly covered block 419-419 --- 417 | else 418 | { >> 419 | return false; 420 | } 421 | ================================================================================ src/Processors/QueryPlan/ReadFromSystemNumbersStep.cpp ================================================================================ --- newly covered block 267-267 --- 265 | { 266 | if (ranges.empty() || isCancelled()) >> 267 | return {}; 268 | 269 | /// Find the data range. ================================================================================ src/Storages/FileLog/FileLogSource.cpp ================================================================================ --- newly covered block 115-115 --- 113 | } 114 | >> 115 | throw std::move(e); 116 | }; 117 | ================================================================================ src/Storages/MergeTree/IMergeTreeDataPart.h ================================================================================ --- newly covered block 342-342 --- 340 | return true; 341 | } >> 342 | return false; 343 | } 344 | ================================================================================ src/Storages/MergeTree/KeyCondition.cpp ================================================================================ --- newly covered block 2583-2583 --- 2581 | return func->prepare(new_arguments)->execute(new_arguments, result_type, input_rows_count, dry_run); 2582 | } >> 2583 | return func->prepare(arguments)->execute(arguments, result_type, input_rows_count, dry_run); 2584 | } 2585 | ================================================================================ src/Storages/MergeTree/MergeTreeIndexBloomFilter.cpp ================================================================================ --- newly covered block 973-973 --- 971 | else 972 | { >> 973 | return false; 974 | } 975 | ================================================================================ src/Storages/MergeTree/ReplicatedMergeTreeQueue.cpp ================================================================================ --- newly covered block 317-317 --- 315 | { 316 | if (merge_entry->type != LogEntry::MERGE_PARTS) >> 317 | continue; 318 | 319 | for (const auto & patch_part : merge_entry->patch_parts) ================================================================================ src/Storages/ObjectStorage/DataLakes/Common/AvroForIcebergDeserializer.cpp ================================================================================ --- newly covered block 383-383 --- 381 | else 382 | { >> 383 | cache_extracted_subcolumns_with_types[path] = std::nullopt; 384 | } 385 | return cache_extracted_subcolumns_with_types[path]; ================================================================================ src/Storages/RabbitMQ/RabbitMQProducer.cpp ================================================================================ --- newly covered block 56-56 --- 54 | setupChannel(); 55 | else >> 56 | throw Exception(ErrorCodes::CANNOT_CONNECT_RABBITMQ, "Cannot connect to RabbitMQ {}", connection.connectionInfoForLog()); 57 | 58 | if (exchange_type == AMQP::ExchangeType::headers) ================================================================================ src/Storages/Statistics/ConditionSelectivityEstimator.cpp ================================================================================ --- newly covered block 526-526 --- 524 | result += static_cast(stats->getNonNullRowCount()) * default_cond_equal_factor; 525 | else >> 526 | result += static_cast(stats->getNonNullRowCount()) * default_cond_range_factor; 527 | } 528 | Float64 rows = static_cast(stats->getNumRows()); ================================================================================ src/Storages/Statistics/Statistics.cpp ================================================================================ --- newly covered block 229-229 --- 227 | if (auto result = stats.at(StatisticsType::MinMax)->estimateLess(val)) 228 | return result; >> 229 | return std::nullopt; 230 | } 231 | ================================================================================ src/Storages/System/StorageSystemClusters.cpp ================================================================================ --- newly covered block 201-201 --- 199 | res_columns[res_index++]->insert(*replica_info.replication_lag); 200 | else >> 201 | res_columns[res_index++]->insertDefault(); 202 | } 203 | } ================================================================================ src/Storages/System/StorageSystemDataSkippingIndices.cpp ================================================================================ --- newly covered block 293-293 --- 291 | continue; 292 | if (database->isExternal()) >> 293 | continue; 294 | column->insert(database_name); 295 | } ================================================================================ src/Storages/System/StorageSystemDroppedTablesParts.cpp ================================================================================ --- newly covered block 45-45 --- 43 | String engine_name = storage->getName(); 44 | if (!dynamic_cast(storage.get())) >> 45 | continue; 46 | 47 | if (check_access_for_tables && !access->isGranted(AccessType::SHOW_TABLES, database_name, table_name)) ================================================================================ src/Storages/VirtualColumnsDescription.cpp ================================================================================ --- newly covered block 74-74 --- 72 | return &(*it); 73 | >> 74 | return nullptr; 75 | } 76 | ================================================================================ src/TableFunctions/TableFunctionMergeTreeAnalyzeIndexes.cpp ================================================================================ --- newly covered block 58-58 --- 56 | array = func->arguments; 57 | else >> 58 | array = ASTPtr(); 59 | } 60 | ================================================================================ src/TableFunctions/TableFunctionRemote.cpp ================================================================================ --- newly covered block 138-138 --- 136 | 137 | if (lit->value.getType() != Field::Types::String) >> 138 | return false; 139 | 140 | res = lit->value.safeGet(); WARNING: Failed to get start time for [Newly Covered Code] - start time and duration won't be set