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

Method InitTemplateTuple

be/src/exec/hdfs-scan-node-base.cc:416–427  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

414}
415
416Tuple* HdfsScanPlanNode::InitTemplateTuple(
417 const std::vector<ScalarExprEvaluator*>& evals, MemPool* pool) const {
418 if (partition_key_slots_.empty() && !HasVirtualColumnInTemplateTuple()) return nullptr;
419 Tuple* template_tuple = Tuple::Create(tuple_desc_->byte_size(), pool);
420 for (int i = 0; i < partition_key_slots_.size(); ++i) {
421 const SlotDescriptor* slot_desc = partition_key_slots_[i];
422 ScalarExprEvaluator* eval = evals[slot_desc->col_pos()];
423 // Exprs guaranteed to be literals, so can safely be evaluated without a row.
424 RawValue::Write(eval->GetValue(NULL), template_tuple, slot_desc, nullptr);
425 }
426 return template_tuple;
427}
428
429int HdfsScanPlanNode::GetMaterializedSlotIdx(const std::vector<int>& path) const {
430 auto result = path_to_materialized_slot_idx_.find(path);

Callers

nothing calls this directly

Calls 6

CreateClass · 0.85
col_posMethod · 0.80
emptyMethod · 0.45
byte_sizeMethod · 0.45
sizeMethod · 0.45
GetValueMethod · 0.45

Tested by

no test coverage detected