| 187 | } |
| 188 | |
| 189 | bool CompressionMetadata::canAlwaysUpdateInPlace() const { |
| 190 | switch (compression) { |
| 191 | case CompressionType::BOOLEAN_BITPACKING: |
| 192 | case CompressionType::UNCOMPRESSED: { |
| 193 | return true; |
| 194 | } |
| 195 | case CompressionType::CONSTANT: |
| 196 | case CompressionType::ALP: |
| 197 | case CompressionType::INTEGER_BITPACKING: { |
| 198 | return false; |
| 199 | } |
| 200 | default: { |
| 201 | throw common::StorageException( |
| 202 | "Unknown compression type with ID " + std::to_string((uint8_t)compression)); |
| 203 | } |
| 204 | } |
| 205 | } |
| 206 | |
| 207 | bool CompressionMetadata::canUpdateInPlace(const uint8_t* data, uint32_t pos, uint64_t numValues, |
| 208 | PhysicalTypeID physicalType, InPlaceUpdateLocalState& localUpdateState, |
no outgoing calls
no test coverage detected