Changed-lines coverage: PR changed C/C++ lines covered by tests: 82.41% (89/108) Uncovered changed code (with context): ================================================================================ src/Processors/Formats/Impl/ArrowIPC/BufferCompression.cpp ================================================================================ --- uncovered block 53-57 --- 51 | { 52 | case LZ4F_max64KB: max_block_size = 64 * 1024; break; >> 53 | case LZ4F_max256KB: max_block_size = 256 * 1024; break; >> 54 | case LZ4F_max1MB: max_block_size = 1024 * 1024; break; 55 | case LZ4F_max4MB: max_block_size = 4 * 1024 * 1024; break; 56 | /// The parsed header accepts no other value; bound any by the smallest block size regardless. >> 57 | default: max_block_size = 64 * 1024; break; 58 | } 59 | --- uncovered block 72-72 --- 70 | { 71 | if (BLOCK_HEADER_SIZE > size - pos) >> 72 | throw Exception(ErrorCodes::INCORRECT_DATA, "Compressed Arrow IPC buffer ends inside an LZ4 block header"); 73 | const auto block_header = static_cast(readLittleEndian(src + pos)); 74 | pos += BLOCK_HEADER_SIZE; --- uncovered block 79-87 --- 77 | const size_t block_size = block_header & ~UNCOMPRESSED_BLOCK_FLAG; 78 | if (block_size > max_block_size) >> 79 | throw Exception(ErrorCodes::INCORRECT_DATA, "Compressed Arrow IPC buffer has an oversized LZ4 block"); 80 | if (block_size > size - pos) >> 81 | throw Exception(ErrorCodes::INCORRECT_DATA, "Compressed Arrow IPC buffer ends inside an LZ4 block"); 82 | pos += block_size; 83 | if (info.blockChecksumFlag == LZ4F_blockChecksumEnabled) 84 | { >> 85 | if (CHECKSUM_SIZE > size - pos) >> 86 | throw Exception(ErrorCodes::INCORRECT_DATA, "Compressed Arrow IPC buffer ends inside an LZ4 block checksum"); >> 87 | pos += CHECKSUM_SIZE; 88 | } 89 | /// An uncompressed block is stored verbatim, so it expands to exactly its stored bytes. --- uncovered block 136-136 --- 134 | LZ4F_dctx * dctx = nullptr; 135 | if (LZ4F_isError(LZ4F_createDecompressionContext(&dctx, LZ4F_getVersion()))) >> 136 | throw Exception(ErrorCodes::CANNOT_DECOMPRESS, "Cannot create LZ4 decompression context"); 137 | LZ4F_frameInfo_t info; 138 | size_t header_size = size; --- uncovered block 147-147 --- 145 | /// A skippable frame carries no blocks and produces nothing, so it cannot expand at all. 146 | if (info.frameType == LZ4F_skippableFrame) >> 147 | return FrameContentBound{0, false}; 148 | 149 | const UInt64 bound = lz4BlockOutputBound(info, src, size, header_size); ================================================================================ src/Processors/Formats/Impl/ArrowIPC/RecordBatchDecoder.cpp ================================================================================ --- uncovered block 1485-1486 --- 1483 | codec = CompressionCodec::Zstd; 1484 | else >> 1485 | throw Exception( >> 1486 | ErrorCodes::INCORRECT_DATA, "Unsupported Arrow IPC compression type {}", static_cast(compression_type)); 1487 | 1488 | /// A decompressed body this large cannot be allocated on any real machine, and `PODArray::resize` --- uncovered block 1496-1496 --- 1494 | { 1495 | if (n >= MAX_DECOMPRESSED_BODY_SIZE) >> 1496 | throw Exception(ErrorCodes::INCORRECT_DATA, "Arrow IPC decompressed body size {} is too large to allocate", n); 1497 | }; 1498 | --- uncovered block 1521-1521 --- 1519 | /// later placement's offset+length writes past it. Use checked arithmetic and fail closed. 1520 | if (pos > std::numeric_limits::max() - 7) >> 1521 | throw Exception(ErrorCodes::INCORRECT_DATA, "Arrow IPC decompressed body size overflows"); 1522 | pos = (pos + 7) & ~size_t(7); 1523 | /// Check the aligned running total here, before the zero-length `continue` below can skip it. --- uncovered block 1551-1553 --- 1549 | /// `buffer_slices` would later expose those uninitialized bytes as decoded Arrow data. 1550 | if (uncompressed_length >= 0 && length == 8 && out_len > 0) >> 1551 | throw Exception( >> 1552 | ErrorCodes::INCORRECT_DATA, >> 1553 | "Arrow IPC compressed buffer declares {} uncompressed bytes but carries no payload", out_len); 1554 | 1555 | /// Check this prefix against the payload before allocating for it. A size the codec pledges is --- uncovered block 1569-1569 --- 1567 | 1568 | if (out_len > std::numeric_limits::max() - pos) >> 1569 | throw Exception(ErrorCodes::INCORRECT_DATA, "Arrow IPC decompressed body size overflows"); 1570 | placements[i] = {pos, out_len, src + 8, static_cast(length - 8), uncompressed_length < 0}; 1571 | pos += out_len; WARNING: Failed to get start time for [Print Uncovered Code] - start time and duration won't be set --- Coverage counts --- Lines : baseline 938,431/1,084,080 -> current 938,093/1,084,193 (delta -338 / +113) Functions : baseline 806,892/878,316 -> current 806,942/878,323 (delta +50 / +7) Branches : baseline 307,682/390,518 -> current 307,566/390,578 (delta -116 / +60)