| 118 | |
| 119 | template<std::floating_point T> |
| 120 | void flushALPExceptions(std::span<const uint8_t> exceptionBuffer, FileHandle* dataFH, |
| 121 | const PageRange& entry, const ColumnChunkMetadata& metadata) { |
| 122 | const auto encodedType = std::is_same_v<T, float> ? PhysicalTypeID::ALP_EXCEPTION_FLOAT : |
| 123 | PhysicalTypeID::ALP_EXCEPTION_DOUBLE; |
| 124 | // we don't care about the min/max values for exceptions |
| 125 | const auto preExceptionMetadata = uncompressedGetMetadata(encodedType, |
| 126 | metadata.compMeta.floatMetadata()->exceptionCapacity, StorageValue{0}, StorageValue{0}); |
| 127 | |
| 128 | const auto exceptionStartPageIdx = |
| 129 | entry.startPageIdx + entry.numPages - preExceptionMetadata.getNumPages(); |
| 130 | DASSERT(exceptionStartPageIdx + preExceptionMetadata.getNumPages() <= dataFH->getNumPages()); |
| 131 | PageRange exceptionBlock{exceptionStartPageIdx, preExceptionMetadata.getNumPages()}; |
| 132 | |
| 133 | CompressedFlushBuffer exceptionFlushBuffer{ |
| 134 | std::make_shared<Uncompressed>(EncodeException<T>::sizeInBytes()), encodedType}; |
| 135 | (void)exceptionFlushBuffer.operator()(exceptionBuffer, dataFH, exceptionBlock, |
| 136 | preExceptionMetadata); |
| 137 | } |
| 138 | } // namespace |
| 139 | |
| 140 | template<std::floating_point T> |
nothing calls this directly
no test coverage detected