Changed-lines coverage: PR changed C/C++ lines covered by tests: 83.85% (296/353) Uncovered changed code (with context): ================================================================================ src/Processors/Formats/Impl/CHColumnToArrowColumn.cpp ================================================================================ --- uncovered block 1167-1167 --- 1165 | if (null_bytemap) 1166 | { >> 1167 | for (size_t value_i = start; value_i < end; ++value_i) 1168 | { 1169 | if ((*null_bytemap)[value_i]) --- uncovered block 1359-1360 --- 1357 | break; 1358 | case TypeIndex::Date: >> 1359 | fillArrowArrayWithDateColumnData(column, null_bytemap, format_name, array_builder, start, end, settings.output_date_as_uint16); >> 1360 | break; 1361 | case TypeIndex::DateTime: 1362 | fillArrowArrayWithDateTimeColumnData(column, null_bytemap, format_name, array_builder, start, end, settings.output_datetime_as_timestamp); --- uncovered block 1668-1668 --- 1666 | if (isTime64(column_type)) 1667 | { >> 1668 | const auto * time64_type = assert_cast(column_type.get()); 1669 | auto arrow_time_unit = getArrowTimeUnit(time64_type); 1670 | if (arrow_time_unit == arrow::TimeUnit::SECOND || arrow_time_unit == arrow::TimeUnit::MILLI) ================================================================================ src/Processors/Formats/Impl/VortexBlockInputFormat.cpp ================================================================================ --- uncovered block 50-62 --- 48 | auto result = ctx->file->ReadAt(static_cast(offset), static_cast(length), out); 49 | if (!result.ok()) >> 50 | throw Exception(ErrorCodes::CANNOT_READ_ALL_DATA, "Error while reading Vortex file: {}", result.status().ToString()); 51 | if (*result != static_cast(length)) >> 52 | throw Exception( >> 53 | ErrorCodes::CANNOT_READ_ALL_DATA, >> 54 | "Unexpected end of Vortex file: read {} bytes instead of {} at offset {}", >> 55 | *result, length, offset); 56 | ctx->bytes_read += length; 57 | return 0; 58 | } 59 | catch (...) 60 | { >> 61 | ctx->exception = std::current_exception(); >> 62 | return 1; 63 | } 64 | } --- uncovered block 74-74 --- 72 | vortex_ffi_free_string(error); 73 | if (callback_exception) >> 74 | std::rethrow_exception(callback_exception); 75 | throw Exception(code, "Error while reading Vortex file: {}", message); 76 | } --- uncovered block 81-81 --- 79 | { 80 | if (!status.ok()) >> 81 | throw Exception(ErrorCodes::INCORRECT_DATA, "Error while reading Vortex file: {}", status.ToString()); 82 | } 83 | --- uncovered block 95-95 --- 93 | arrow_file = asArrowFile(in, format_settings, is_stopped, "Vortex", VORTEX_MAGIC_BYTES); 94 | if (is_stopped) >> 95 | return nullptr; 96 | 97 | auto file_size = arrow_file->GetSize(); --- uncovered block 110-118 --- 108 | if (vortex_ffi_reader_schema(reader, &c_schema, &error) != 0) 109 | { >> 110 | vortex_ffi_reader_free(reader); >> 111 | throwVortexError(error, read_context.exception); 112 | } 113 | 114 | auto schema = arrow::ImportSchema(&c_schema); 115 | if (!schema.ok()) 116 | { >> 117 | vortex_ffi_reader_free(reader); >> 118 | throwFromArrowStatusIfFailed(schema.status()); 119 | } 120 | file_schema = *schema; --- uncovered block 159-159 --- 157 | reader = openVortexReader(*in, format_settings, is_stopped, arrow_file, *read_context, file_schema); 158 | if (!reader) >> 159 | return; 160 | 161 | arrow_column_to_ch_column = std::make_unique( --- uncovered block 203-226 --- 201 | if (column_names.empty()) 202 | { >> 203 | pending_rows_without_columns = vortex_ffi_reader_row_count(reader); >> 204 | return; 205 | } 206 | 207 | char * error = nullptr; 208 | scanner = vortex_ffi_scanner_create(reader, column_name_pointers.data(), column_name_pointers.size(), &error); 209 | if (!scanner) >> 210 | throwVortexError(error, read_context->exception); 211 | } 212 | 213 | Chunk VortexBlockInputFormat::readWithoutColumns() 214 | { >> 215 | if (!pending_rows_without_columns) >> 216 | return {}; 217 | >> 218 | size_t num_rows = std::min(pending_rows_without_columns, DEFAULT_BLOCK_SIZE); >> 219 | pending_rows_without_columns -= num_rows; 220 | >> 221 | auto batch = arrow::RecordBatch::Make(arrow::schema(arrow::FieldVector{}), num_rows, arrow::ArrayVector{}); >> 222 | auto table = arrow::Table::FromRecordBatches({batch}); >> 223 | throwFromArrowStatusIfFailed(table.status()); 224 | >> 225 | BlockMissingValues * block_missing_values_ptr = format_settings.defaults_for_omitted_fields ? &block_missing_values : nullptr; >> 226 | return arrow_column_to_ch_column->arrowTableToCHChunk(*table, num_rows, nullptr, block_missing_values_ptr); 227 | } 228 | --- uncovered block 237-237 --- 235 | 236 | if (is_stopped) >> 237 | return {}; 238 | 239 | if (need_only_count) --- uncovered block 248-248 --- 246 | 247 | if (!scanner) >> 248 | return readWithoutColumns(); 249 | 250 | char * error = nullptr; --- uncovered block 255-255 --- 253 | int32_t result = vortex_ffi_scanner_next(scanner, &c_array, &c_schema, &error); 254 | if (result < 0) >> 255 | throwVortexError(error, read_context->exception); 256 | if (result == 0) 257 | return {}; --- uncovered block 279-292 --- 277 | void VortexBlockInputFormat::resetParser() 278 | { >> 279 | IInputFormat::resetParser(); 280 | >> 281 | closeReader(); >> 282 | arrow_column_to_ch_column.reset(); >> 283 | pending_rows_without_columns = 0; >> 284 | count_returned = false; >> 285 | block_missing_values.clear(); >> 286 | approx_bytes_read_for_chunk = 0; >> 287 | previous_approx_bytes_read = 0; 288 | } 289 | 290 | const BlockMissingValues * VortexBlockInputFormat::getMissingValues() const 291 | { >> 292 | return &block_missing_values; 293 | } 294 | --- uncovered block 329-329 --- 327 | format_settings.parquet.allow_geoparquet_parser); 328 | if (format_settings.schema_inference_make_columns_nullable == 1) >> 329 | return getNamesAndRecursivelyNullableTypes(header, format_settings); 330 | return header.getNamesAndTypesList(); 331 | } ================================================================================ src/Processors/Formats/Impl/VortexBlockOutputFormat.cpp ================================================================================ --- uncovered block 46-47 --- 44 | catch (...) 45 | { >> 46 | ctx->exception = std::current_exception(); >> 47 | return 1; 48 | } 49 | } --- uncovered block 57-57 --- 55 | vortex_ffi_free_string(error); 56 | if (callback_exception) >> 57 | std::rethrow_exception(callback_exception); 58 | throw Exception(ErrorCodes::CANNOT_WRITE_TO_OSTREAM, "Error while writing Vortex file: {}", message); 59 | } --- uncovered block 64-64 --- 62 | { 63 | if (!status.ok()) >> 64 | throw Exception(ErrorCodes::INCORRECT_DATA, "Error while writing Vortex file: {}", status.ToString()); 65 | } 66 | --- uncovered block 111-111 --- 109 | { 110 | if (!chunk.getNumRows()) >> 111 | return; 112 | 113 | if (!writer) --- uncovered block 132-132 --- 130 | char * error = nullptr; 131 | if (vortex_ffi_writer_write(writer, &c_array, &c_schema, &error) != 0) >> 132 | throwVortexError(error, write_context->exception); 133 | } 134 | --- uncovered block 143-143 --- 141 | char * error = nullptr; 142 | if (vortex_ffi_writer_finish(writer, &error) != 0) >> 143 | throwVortexError(error, write_context->exception); 144 | } 145 | --- uncovered block 151-157 --- 149 | /// `MessageQueueSink` formats every message). The Rust writer is consumed by 150 | /// `vortex_ffi_writer_finish`, so drop it and start the next file from scratch. >> 151 | if (writer) 152 | { >> 153 | vortex_ffi_writer_free(writer); >> 154 | writer = nullptr; 155 | } >> 156 | ch_column_to_arrow_column.reset(); >> 157 | write_context.reset(); 158 | } 159 | ================================================================================ src/Processors/Formats/Impl/VortexBlockOutputFormat.h ================================================================================ --- uncovered block 29-29 --- 27 | ~VortexBlockOutputFormat() override; 28 | >> 29 | String getName() const override { return "VortexBlockOutputFormat"; } 30 | 31 | private: WARNING: Failed to get start time for [Print Uncovered Code] - start time and duration won't be set --- Coverage counts --- Lines : baseline 939,917/1,086,316 -> current 940,392/1,086,751 (delta +475 / +435) Functions : baseline 807,139/878,623 -> current 807,202/878,678 (delta +63 / +55) Branches : baseline 308,476/391,612 -> current 308,482/391,716 (delta +6 / +104)