| 45 | } |
| 46 | |
| 47 | DescriptorTbl* DescriptorTblBuilder::Build() { |
| 48 | DCHECK(!tuples_descs_.empty()); |
| 49 | |
| 50 | TBuildTestDescriptorTableParams params; |
| 51 | for (int i = 0; i < tuples_descs_.size(); ++i) { |
| 52 | params.slot_types.push_back(vector<TColumnType>()); |
| 53 | vector<TColumnType>& tslot_types = params.slot_types.back(); |
| 54 | const vector<ColumnType>& slot_types = tuples_descs_[i]->slot_types(); |
| 55 | for (const ColumnType& slot_type : slot_types) { |
| 56 | tslot_types.push_back(slot_type.ToThrift()); |
| 57 | } |
| 58 | } |
| 59 | |
| 60 | Status buildDescTblStatus = fe_->BuildTestDescriptorTable(params, &thrift_desc_tbl_); |
| 61 | DCHECK(buildDescTblStatus.ok()) << buildDescTblStatus.GetDetail(); |
| 62 | |
| 63 | DescriptorTbl* desc_tbl; |
| 64 | Status status = DescriptorTbl::CreateInternal(obj_pool_, thrift_desc_tbl_, &desc_tbl); |
| 65 | DCHECK(status.ok()) << status.GetDetail(); |
| 66 | return desc_tbl; |
| 67 | } |
| 68 | |
| 69 | } |
nothing calls this directly
no test coverage detected