MCPcopy Create free account
hub / github.com/apache/impala / FinalizePartitionFileImpl

Method FinalizePartitionFileImpl

be/src/exec/table-sink-base.cc:462–486  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

460}
461
462Status TableSinkBase::FinalizePartitionFileImpl(RuntimeState* state,
463 OutputPartition* partition, bool is_delete, DmlExecState* dml_exec_state) {
464 DCHECK(dml_exec_state != nullptr);
465 if (partition->tmp_hdfs_file == nullptr && !is_overwrite()) return Status::OK();
466 SCOPED_TIMER(ADD_TIMER(profile(), "FinalizePartitionFileTimer"));
467
468 // OutputPartition writer could be nullptr if there is no row to output.
469 if (partition->writer.get() != nullptr) {
470 RETURN_IF_ERROR(partition->writer->Finalize());
471 dml_exec_state->UpdatePartition(
472 partition->partition_name, partition->current_file_rows,
473 &partition->writer->stats(), is_delete);
474 if (is_delete) {
475 DCHECK(IsIceberg());
476 dml_exec_state->AddCreatedDeleteFile(*partition,
477 partition->writer->iceberg_file_stats());
478 } else {
479 dml_exec_state->AddCreatedFile(*partition, IsIceberg(),
480 partition->writer->iceberg_file_stats());
481 }
482 }
483
484 RETURN_IF_ERROR(ClosePartitionFile(state, partition));
485 return Status::OK();
486}
487
488}
489

Callers

nothing calls this directly

Calls 6

OKFunction · 0.85
UpdatePartitionMethod · 0.80
AddCreatedDeleteFileMethod · 0.80
AddCreatedFileMethod · 0.80
getMethod · 0.65
FinalizeMethod · 0.45

Tested by

no test coverage detected