| 528 | } |
| 529 | |
| 530 | std::string BaseVector::toString(bool recursive) const { |
| 531 | std::stringstream out; |
| 532 | out << toSummaryString(); |
| 533 | |
| 534 | if (recursive) { |
| 535 | switch (encoding()) { |
| 536 | case VectorEncoding::Simple::DICTIONARY: |
| 537 | case VectorEncoding::Simple::SEQUENCE: |
| 538 | case VectorEncoding::Simple::CONSTANT: |
| 539 | if (valueVector() != nullptr) { |
| 540 | out << ", " << valueVector()->toString(true); |
| 541 | } |
| 542 | break; |
| 543 | default: |
| 544 | break; |
| 545 | } |
| 546 | } |
| 547 | |
| 548 | return out.str(); |
| 549 | } |
| 550 | |
| 551 | std::string BaseVector::toString(vector_size_t index) const { |
| 552 | BOLT_CHECK_LT(index, length_, "Vector index should be less than length."); |