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

Method WriteRowsToFile

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

Source from the content-addressed store, hash-verified

408}
409
410Status TableSinkBase::WriteRowsToFile(
411 RuntimeState* state, RowBatch* batch, OutputPartition* output_partition,
412 const std::vector<int32_t>& indices, bool *new_file) {
413 Status status =
414 output_partition->writer->AppendRows(batch, indices, new_file);
415 if (!status.ok()) {
416 // IMPALA-10607: Deletes partition file if staging is skipped when appending rows
417 // fails. Otherwise, it leaves the file in un-finalized state.
418 if (ShouldSkipStaging(state, output_partition)) {
419 status.MergeStatus(ClosePartitionFile(state, output_partition));
420 hdfsDelete(output_partition->hdfs_connection,
421 output_partition->current_file_name.c_str(), 0);
422 }
423 return status;
424 }
425 return Status::OK();
426}
427
428void TableSinkBase::GetHashTblKey(const TupleRow* row,
429 const vector<ScalarExprEvaluator*>& evals, string* key) {

Callers

nothing calls this directly

Calls 4

OKFunction · 0.85
MergeStatusMethod · 0.80
AppendRowsMethod · 0.45
okMethod · 0.45

Tested by

no test coverage detected