mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 15:42:02 +00:00
Working setColumns, setConstraints, setIndices
This commit is contained in:
parent
af2fe2ba55
commit
aa30649ce5
@ -82,7 +82,7 @@ public:
|
||||
IStorage() = delete;
|
||||
/// Storage fields should be initialized in separate methods like setColumns
|
||||
/// or setTableTTLs.
|
||||
explicit IStorage(StorageID storage_id_) : storage_id(std::move(storage_id_)) {} //-V730
|
||||
explicit IStorage(StorageID storage_id_) : storage_id(std::move(storage_id_)), metadata(std::make_shared<StorageInMemoryMetadata>()) {} //-V730
|
||||
|
||||
virtual ~IStorage() = default;
|
||||
IStorage(const IStorage &) = delete;
|
||||
|
@ -142,9 +142,8 @@ MergeTreeData::MergeTreeData(
|
||||
if (relative_data_path.empty())
|
||||
throw Exception("MergeTree storages require data path", ErrorCodes::INCORRECT_FILE_NAME);
|
||||
|
||||
setSettingsChanges(metadata_.settings_changes);
|
||||
const auto settings = getSettings();
|
||||
setProperties(metadata_, attach);
|
||||
const auto settings = getSettings();
|
||||
|
||||
/// NOTE: using the same columns list as is read when performing actual merges.
|
||||
merging_params.check(getColumns().getAllPhysical());
|
||||
@ -385,8 +384,6 @@ void MergeTreeData::checkProperties(const StorageInMemoryMetadata & new_metadata
|
||||
void MergeTreeData::setProperties(const StorageInMemoryMetadata & new_metadata, bool attach)
|
||||
{
|
||||
checkProperties(new_metadata, attach);
|
||||
|
||||
/// Other parts of metadata initialized is separate methods
|
||||
setInMemoryMetadata(new_metadata);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user