| 27 | } |
| 28 | |
| 29 | unique_ptr<ColumnSegmentState> ColumnSegmentState::Deserialize(Deserializer &deserializer) { |
| 30 | auto compression_type = deserializer.Get<CompressionType>(); |
| 31 | auto &db = deserializer.Get<DatabaseInstance &>(); |
| 32 | auto &type = deserializer.Get<const LogicalType &>(); |
| 33 | |
| 34 | auto compression_function = |
| 35 | DBConfig::GetConfig(db).TryGetCompressionFunction(compression_type, type.InternalType()); |
| 36 | if (!compression_function || !compression_function->deserialize_state) { |
| 37 | throw SerializationException("Deserializing a ColumnSegmentState but could not find deserialize method"); |
| 38 | } |
| 39 | return compression_function->deserialize_state(deserializer); |
| 40 | } |
| 41 | |
| 42 | } // namespace duckdb |
no test coverage detected