diff --git a/dbms/src/Storages/StorageMemory.cpp b/dbms/src/Storages/StorageMemory.cpp index 37eb77dad89..950d40961b4 100644 --- a/dbms/src/Storages/StorageMemory.cpp +++ b/dbms/src/Storages/StorageMemory.cpp @@ -28,7 +28,7 @@ Block MemoryBlockInputStream::readImpl() MemoryBlockOutputStream::MemoryBlockOutputStream(StoragePtr owned_storage) - : IBlockOutputStream(owned_storage), storage(reinterpret_cast(owned_storage)) + : IBlockOutputStream(owned_storage), storage(dynamic_cast(*owned_storage)) { }