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

Method CreateTemplateTuple

be/src/exec/file-metadata-utils.cc:39–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37}
38
39Tuple* FileMetadataUtils::CreateTemplateTuple(int64_t partition_id, MemPool* mem_pool,
40 std::map<const SlotId, const SlotDescriptor*>* slot_descs_written) {
41 DCHECK(file_desc_ != nullptr);
42 // Initialize the template tuple, it is copied from the template tuple map in the
43 // HdfsScanNodeBase.
44 Tuple* template_tuple = scan_node_->GetTemplateTupleForPartitionId(partition_id);
45 if (template_tuple != nullptr) {
46 template_tuple = template_tuple->DeepCopy(*scan_node_->tuple_desc(), mem_pool);
47 }
48 if (UNLIKELY(!scan_node_->virtual_column_slots().empty())) {
49 AddFileLevelVirtualColumns(mem_pool, template_tuple);
50 }
51 if (scan_node_->hdfs_table()->IsIcebergTable()) {
52 AddIcebergColumns(mem_pool, &template_tuple, slot_descs_written);
53
54 PopulateIcebergDefaults(template_tuple, mem_pool);
55 }
56 return template_tuple;
57}
58
59TextConverter FileMetadataUtils::CreateTextConverter() const {
60 return TextConverter(/* escape_char */ '\\',

Callers 2

OpenMethod · 0.80

Calls 6

IsIcebergTableMethod · 0.80
hdfs_tableMethod · 0.80
DeepCopyMethod · 0.45
tuple_descMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected