| 446 | } |
| 447 | |
| 448 | Status PuffinWriter::LoadExistingDeletionVector( |
| 449 | const std::string& puffin_file_path, |
| 450 | const std::string& data_file_path, |
| 451 | int64_t content_offset, |
| 452 | int64_t content_size) { |
| 453 | |
| 454 | DCHECK(output_->hdfs_connection != nullptr) |
| 455 | << "HDFS connection must be initialized before loading DVs. " |
| 456 | << "Ensure Init() was called successfully."; |
| 457 | DCHECK(dv_blob_reader_ != nullptr) |
| 458 | << "DV blob reader not initialized"; |
| 459 | |
| 460 | VLOG(2) << "Loading existing deletion vector from Puffin file '" |
| 461 | << puffin_file_path << "' at offset " << content_offset |
| 462 | << " with size " << content_size << " for data file '" |
| 463 | << data_file_path << "'"; |
| 464 | |
| 465 | RETURN_IF_ERROR(ValidateBlobLocation( |
| 466 | puffin_file_path, content_offset, content_size)); |
| 467 | |
| 468 | RoaringBitmap64 loaded_dv; |
| 469 | Status load_status = dv_blob_reader_->Load( |
| 470 | io_request_context_.get(), parent_->mem_tracker(), obj_pool_, |
| 471 | puffin_file_path, content_offset, content_size, &loaded_dv); |
| 472 | |
| 473 | if (!load_status.ok()) { |
| 474 | return Status(strings::Substitute( |
| 475 | "Failed to load deletion vector from '$0': $1", |
| 476 | puffin_file_path, load_status.msg().msg())); |
| 477 | } |
| 478 | |
| 479 | VLOG(2) << "Successfully loaded DV with " << loaded_dv.Cardinality() |
| 480 | << " deleted positions"; |
| 481 | |
| 482 | auto& target_dv = deletion_vectors_[data_file_path]; |
| 483 | |
| 484 | target_dv.Or(loaded_dv); |
| 485 | |
| 486 | return Status::OK(); |
| 487 | } |
| 488 | |
| 489 | } // namespace impala |
nothing calls this directly
no test coverage detected