Merge pull request #41105 from ClickHouse/vdimir/upd_storage_rdb_sample_block

This commit is contained in:
Vladimir C 2022-09-13 12:37:12 +02:00 committed by GitHub
commit cc7292df74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -523,8 +523,7 @@ Chunk StorageEmbeddedRocksDB::getByKeys(
Block StorageEmbeddedRocksDB::getSampleBlock(const Names &) const Block StorageEmbeddedRocksDB::getSampleBlock(const Names &) const
{ {
auto metadata = getInMemoryMetadataPtr(); return getInMemoryMetadataPtr()->getSampleBlock();
return metadata ? metadata->getSampleBlock() : Block();
} }
Chunk StorageEmbeddedRocksDB::getBySerializedKeys( Chunk StorageEmbeddedRocksDB::getBySerializedKeys(