| 354 | } |
| 355 | |
| 356 | static std::string printEncodings(const VectorPtr& vector) { |
| 357 | std::stringstream out; |
| 358 | out << vector->encoding(); |
| 359 | |
| 360 | VectorPtr inner = vector; |
| 361 | do { |
| 362 | switch (inner->encoding()) { |
| 363 | case VectorEncoding::Simple::DICTIONARY: |
| 364 | case VectorEncoding::Simple::CONSTANT: |
| 365 | inner = inner->valueVector(); |
| 366 | if (inner == nullptr) { |
| 367 | return out.str(); |
| 368 | } |
| 369 | break; |
| 370 | default: |
| 371 | return out.str(); |
| 372 | } |
| 373 | |
| 374 | out << ", " << inner->encoding(); |
| 375 | } while (true); |
| 376 | BOLT_UNREACHABLE(); |
| 377 | } |
| 378 | |
| 379 | void testCopyEncoded(VectorPtr source) { |
| 380 | bool maybeConstant = false; |