Changed-lines coverage: PR changed C/C++ lines covered by tests: 72.50% (58/80) Uncovered changed code (with context): ================================================================================ src/Databases/DataLake/HTTPBasedCatalogUtils.cpp ================================================================================ --- uncovered block 66-66 --- 64 | auto buf = createReadBuffer(endpoint, context, bearer_token, params, headers, method, out_stream_callaback); 65 | if (buf->eof()) >> 66 | return {}; 67 | 68 | String json_str; ================================================================================ src/Databases/DataLake/PaimonRestCatalog.cpp ================================================================================ --- uncovered block 138-148 --- 136 | const std::optional & data) const 137 | { >> 138 | if (!token.has_value()) 139 | { >> 140 | return ""; 141 | } >> 142 | if (token->token_provider == "bearer") 143 | { 144 | /// The bearer token is applied by `create` (it fills the `Authorization` header), so it is 145 | /// returned rather than spliced into `current_headers` here. >> 146 | return token->bearer_token; 147 | } >> 148 | else if (token->token_provider == "dlf") 149 | { 150 | std::unordered_map headers_map; --- uncovered block 259-265 --- 257 | for (const auto & entry : headers_map) 258 | { >> 259 | current_headers.emplace_back(entry.first, entry.second); 260 | } 261 | /// The `dlf` provider signs the request with its own `Authorization` header (added above), so 262 | /// there is no bearer token for `create`. >> 263 | return ""; 264 | } >> 265 | throw DB::Exception(DB::ErrorCodes::BAD_ARGUMENTS, "Unknown token provider: {}", token->token_provider); 266 | } 267 | --- uncovered block 281-287 --- 279 | for (const auto & entry : params) 280 | { >> 281 | query_parameters_map.emplace(entry.first, entry.second); 282 | } >> 283 | DB::HTTPHeaderEntries request_headers(headers); >> 284 | const String bearer_token = createAuthHeaders(request_headers, endpoint, query_parameters_map, method); 285 | 286 | >> 287 | DB::WriteBufferFromOwnString headers_string; 288 | headers_string << "{"; 289 | for (const auto & entry : request_headers) --- uncovered block 301-307 --- 299 | .withTimeouts(DB::ConnectionTimeouts::getHTTPTimeouts(context->getSettingsRef(), context->getServerSettings())) 300 | .withHostFilter(&getContext()->getRemoteHostFilter()) >> 301 | .withHeaders(request_headers) >> 302 | .withDelayInit(false) >> 303 | .withSkipNotFound(false) >> 304 | .createWithBearerToken(bearer_token); 305 | }; 306 | >> 307 | bool refresh_token = true; 308 | LOG_TRACE(log, "Requesting endpoint: {}", endpoint); 309 | try ================================================================================ src/Databases/DataLake/UnityCatalog.cpp ================================================================================ --- uncovered block 55-58 --- 53 | 54 | if (has_data_source_format && table->get("data_source_format").extract() != READABLE_DATA_SOURCE_FORMAT) >> 55 | return false; 56 | 57 | if (!has_securable_kind && !has_data_source_format) >> 58 | return false; 59 | 60 | return true; --- uncovered block 452-452 --- 450 | params.pop_back(); 451 | >> 452 | params.push_back({"page_token", continuation_token}); 453 | } 454 | else ================================================================================ src/IO/ReadWriteBufferFromHTTP.cpp ================================================================================ --- uncovered block 845-845 --- 843 | HTTPHeaderEntries header_entries = http_header_entries; 844 | if (!bearer_token_.empty()) >> 845 | header_entries.emplace_back("Authorization", "Bearer " + bearer_token_); 846 | 847 | // todo it could be a problem if ReadWriteBufferFromHTTP throws WARNING: Failed to get start time for [Print Uncovered Code] - start time and duration won't be set --- Coverage counts --- Lines : baseline 907,415/1,052,676 -> current 907,399/1,052,706 (delta -16 / +30) Functions : baseline 800,581/869,858 -> current 800,724/869,862 (delta +143 / +4) Branches : baseline 292,552/373,700 -> current 292,445/373,704 (delta -107 / +4)