| 37 | } |
| 38 | |
| 39 | Tuple* 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 | |
| 59 | TextConverter FileMetadataUtils::CreateTextConverter() const { |
| 60 | return TextConverter(/* escape_char */ '\\', |
no test coverage detected