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

Method Prepare

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

Source from the content-addressed store, hash-verified

45}
46
47Status TableSinkBase::Prepare(RuntimeState* state, MemTracker* parent_mem_tracker) {
48 RETURN_IF_ERROR(DataSink::Prepare(state, parent_mem_tracker));
49 partitions_created_counter_ = ADD_COUNTER(profile(), "PartitionsCreated", TUnit::UNIT);
50 files_created_counter_ = ADD_COUNTER(profile(), "FilesCreated", TUnit::UNIT);
51 rows_inserted_counter_ = ADD_COUNTER(profile(), "RowsInserted", TUnit::UNIT);
52 bytes_written_counter_ = ADD_COUNTER(profile(), "BytesWritten", TUnit::BYTES);
53 encode_timer_ = ADD_TIMER(profile(), "EncodeTimer");
54 hdfs_write_timer_ = ADD_TIMER(profile(), "HdfsWriteTimer");
55 compress_timer_ = ADD_TIMER(profile(), "CompressTimer");
56
57 RETURN_IF_ERROR(ScalarExprEvaluator::Create(partition_key_exprs_, state,
58 state->obj_pool(), expr_perm_pool_.get(), expr_results_pool_.get(),
59 &partition_key_expr_evals_));
60
61 // Prepare partition key exprs and gather dynamic partition key exprs.
62 for (size_t i = 0; i < partition_key_expr_evals_.size(); ++i) {
63 // Remember non-constant partition key exprs for building hash table of Hdfs files.
64 if (!partition_key_expr_evals_[i]->root().is_constant()) {
65 dynamic_partition_key_expr_evals_.push_back(partition_key_expr_evals_[i]);
66 }
67 }
68
69 return Status::OK();
70}
71
72Status TableSinkBase::Open(RuntimeState* state) {
73 RETURN_IF_ERROR(DataSink::Open(state));

Callers

nothing calls this directly

Calls 8

CreateClass · 0.85
OKFunction · 0.85
rootMethod · 0.80
push_backMethod · 0.80
getMethod · 0.65
obj_poolMethod · 0.45
sizeMethod · 0.45
is_constantMethod · 0.45

Tested by

no test coverage detected