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

Function PrintSlot

be/src/util/debug-util.cc:154–165  ·  view source on GitHub ↗

Generic recursive dispatch to print a slot descriptor

Source from the content-addressed store, hash-verified

152
153// Generic recursive dispatch to print a slot descriptor
154static void PrintSlot(const Tuple* t, const SlotDescriptor& slot_d, stringstream* out) {
155 if (t->IsNull(slot_d.null_indicator_offset())) {
156 *out << "null";
157 } else if (slot_d.type().IsCollectionType()) {
158 PrintCollection(t, slot_d, out);
159 } else if (slot_d.type().IsStructType()) {
160 PrintStruct(t, slot_d, out);
161 } else {
162 RawValue::PrintValue(t->GetSlot(slot_d.tuple_offset()), slot_d.type(), -1, out,
163 /*quote_val*/ true);
164 }
165}
166
167// Print a collection (array or map), recursing through the children.
168// Example: [(a 1) (b 2)]

Callers 2

PrintStructFunction · 0.85
PrintTupleFunction · 0.85

Calls 9

PrintCollectionFunction · 0.85
PrintStructFunction · 0.85
PrintValueFunction · 0.85
IsCollectionTypeMethod · 0.80
IsStructTypeMethod · 0.80
tuple_offsetMethod · 0.80
IsNullMethod · 0.45
typeMethod · 0.45
GetSlotMethod · 0.45

Tested by

no test coverage detected