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

Method SlotDescriptor

be/src/runtime/descriptors.cc:108–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106}
107
108SlotDescriptor::SlotDescriptor(const TSlotDescriptor& tdesc,
109 const TupleDescriptor* parent, const TupleDescriptor* children_tuple_descriptor)
110 : id_(tdesc.id),
111 type_(ColumnType::FromThrift(tdesc.slotType)),
112 parent_(parent),
113 children_tuple_descriptor_(children_tuple_descriptor),
114 col_path_(tdesc.materializedPath),
115 tuple_offset_(tdesc.byteOffset),
116 null_indicator_offset_(tdesc.nullIndicatorByte, tdesc.nullIndicatorBit),
117 slot_idx_(tdesc.slotIdx),
118 slot_size_(type_.GetSlotSize()),
119 virtual_column_type_(tdesc.virtual_col_type) {
120 DCHECK(parent_ != nullptr) << tdesc.parent;
121 if (type_.IsComplexType()) {
122 DCHECK(tdesc.__isset.itemTupleId);
123 DCHECK(children_tuple_descriptor_ != nullptr) << tdesc.itemTupleId;
124 } else {
125 DCHECK(!tdesc.__isset.itemTupleId);
126 DCHECK(children_tuple_descriptor == nullptr);
127 }
128 if (tdesc.__isset.structFieldIdx) {
129 struct_field_idx_ = tdesc.structFieldIdx;
130 }
131}
132
133bool SlotDescriptor::ColPathLessThan(const SlotDescriptor* a, const SlotDescriptor* b) {
134 int common_levels = min(a->col_path().size(), b->col_path().size());

Callers

nothing calls this directly

Calls 2

GetSlotSizeMethod · 0.80
IsComplexTypeMethod · 0.80

Tested by

no test coverage detected