Generic recursive dispatch to print a slot descriptor
| 152 | |
| 153 | // Generic recursive dispatch to print a slot descriptor |
| 154 | static 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)] |
no test coverage detected