| 436 | } |
| 437 | |
| 438 | std::string CompressionMetadata::toString(const PhysicalTypeID physicalType) const { |
| 439 | switch (compression) { |
| 440 | case CompressionType::UNCOMPRESSED: { |
| 441 | return "UNCOMPRESSED"; |
| 442 | } |
| 443 | case CompressionType::ALP: { |
| 444 | uint8_t bitWidth = TypeUtils::visit( |
| 445 | physicalType, |
| 446 | [&]<std::floating_point T>(T) { |
| 447 | static constexpr common::idx_t BITPACKING_CHILD_IDX = 0; |
| 448 | return IntegerBitpacking<typename FloatCompression<T>::EncodedType>::getPackingInfo( |
| 449 | getChild(BITPACKING_CHILD_IDX)) |
| 450 | .bitWidth; |
| 451 | }, |
| 452 | [](auto) -> uint8_t { UNREACHABLE_CODE; }); |
| 453 | return std::format("FLOAT_COMPRESSION[{}], {} Exceptions", bitWidth, |
| 454 | floatMetadata()->exceptionCount); |
| 455 | } |
| 456 | case CompressionType::INTEGER_BITPACKING: { |
| 457 | uint8_t bitWidth = TypeUtils::visit( |
| 458 | physicalType, |
| 459 | [&](common::internalID_t) { |
| 460 | return IntegerBitpacking<uint64_t>::getPackingInfo(*this).bitWidth; |
| 461 | }, |
| 462 | [](bool) -> uint8_t { UNREACHABLE_CODE; }, |
| 463 | [&]<numeric_utils::IsIntegral T>( |
| 464 | T) { return IntegerBitpacking<T>::getPackingInfo(*this).bitWidth; }, |
| 465 | [](auto) -> uint8_t { UNREACHABLE_CODE; }); |
| 466 | return std::format("INTEGER_BITPACKING[{}]", bitWidth); |
| 467 | } |
| 468 | case CompressionType::BOOLEAN_BITPACKING: { |
| 469 | return "BOOLEAN_BITPACKING"; |
| 470 | } |
| 471 | case CompressionType::CONSTANT: { |
| 472 | return "CONSTANT"; |
| 473 | } |
| 474 | default: { |
| 475 | UNREACHABLE_CODE; |
| 476 | } |
| 477 | } |
| 478 | } |
| 479 | |
| 480 | void ConstantCompression::decompressValues(uint8_t* dstBuffer, uint64_t dstOffset, |
| 481 | uint64_t numValues, common::PhysicalTypeID physicalType, uint32_t numBytesPerValue, |
no test coverage detected