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

Method ComputeSlotMaterializationOrder

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

Source from the content-addressed store, hash-verified

1103}
1104
1105void HdfsScanPlanNode::ComputeSlotMaterializationOrder(
1106 const DescriptorTbl& desc_tbl, vector<int>* order) const {
1107 const vector<ScalarExpr*>& conjuncts = conjuncts_;
1108 // Initialize all order to be conjuncts.size() (after the last conjunct)
1109 order->insert(order->begin(), materialized_slots_.size(), conjuncts.size());
1110
1111 vector<SlotId> slot_ids;
1112 for (int conjunct_idx = 0; conjunct_idx < conjuncts.size(); ++conjunct_idx) {
1113 slot_ids.clear();
1114 int num_slots = conjuncts[conjunct_idx]->GetSlotIds(&slot_ids);
1115 for (int j = 0; j < num_slots; ++j) {
1116 SlotDescriptor* slot_desc = desc_tbl.GetSlotDescriptor(slot_ids[j]);
1117 int slot_idx = GetMaterializedSlotIdx(slot_desc->col_path());
1118 // slot_idx == -1 means this was a partition key slot which is always
1119 // materialized before any slots.
1120 if (slot_idx == -1) continue;
1121 // If this slot hasn't been assigned an order, assign it be materialized
1122 // before evaluating conjuncts[i]
1123 if ((*order)[slot_idx] == conjuncts.size()) {
1124 (*order)[slot_idx] = conjunct_idx;
1125 }
1126 }
1127 }
1128}
1129
1130bool HdfsScanPlanNode::HasVirtualColumnInTemplateTuple() const {
1131 for (SlotDescriptor* sd : virtual_column_slots_) {

Callers 1

Calls 6

clearMethod · 0.65
insertMethod · 0.45
beginMethod · 0.45
sizeMethod · 0.45
GetSlotIdsMethod · 0.45
GetSlotDescriptorMethod · 0.45

Tested by

no test coverage detected