2020-05-21 19:07:18 +00:00
|
|
|
#include <Storages/StorageInMemoryMetadata.h>
|
|
|
|
|
2020-02-14 13:17:50 +00:00
|
|
|
namespace DB
|
|
|
|
{
|
2020-05-21 19:07:18 +00:00
|
|
|
|
2020-02-14 13:17:50 +00:00
|
|
|
StorageInMemoryMetadata::StorageInMemoryMetadata(
|
|
|
|
const ColumnsDescription & columns_,
|
2020-06-01 12:11:23 +00:00
|
|
|
const IndicesDescription & secondary_indices_,
|
2020-02-14 13:17:50 +00:00
|
|
|
const ConstraintsDescription & constraints_)
|
|
|
|
: columns(columns_)
|
2020-06-01 12:11:23 +00:00
|
|
|
, secondary_indices(secondary_indices_)
|
2020-02-14 13:17:50 +00:00
|
|
|
, constraints(constraints_)
|
|
|
|
{
|
|
|
|
}
|
2020-06-08 14:18:38 +00:00
|
|
|
|
|
|
|
StorageInMemoryMetadata::StorageInMemoryMetadata(const StorageInMemoryMetadata & other)
|
|
|
|
: columns(other.columns)
|
|
|
|
, secondary_indices(other.secondary_indices)
|
|
|
|
, constraints(other.constraints)
|
|
|
|
, partition_key(other.partition_key)
|
|
|
|
, primary_key(other.primary_key)
|
|
|
|
, sorting_key(other.sorting_key)
|
|
|
|
, sampling_key(other.sampling_key)
|
|
|
|
, column_ttls_by_name(other.column_ttls_by_name)
|
|
|
|
, table_ttl(other.table_ttl)
|
|
|
|
, settings_changes(other.settings_changes ? other.settings_changes->clone() : nullptr)
|
|
|
|
, select(other.select)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
StorageInMemoryMetadata & StorageInMemoryMetadata::operator=(const StorageInMemoryMetadata & other)
|
|
|
|
{
|
2020-06-09 17:42:04 +00:00
|
|
|
if (&other == this)
|
|
|
|
return *this;
|
|
|
|
|
2020-06-08 14:18:38 +00:00
|
|
|
columns = other.columns;
|
|
|
|
secondary_indices = other.secondary_indices;
|
|
|
|
constraints = other.constraints;
|
|
|
|
partition_key = other.partition_key;
|
|
|
|
primary_key = other.primary_key;
|
|
|
|
sorting_key = other.sorting_key;
|
|
|
|
sampling_key = other.sampling_key;
|
|
|
|
column_ttls_by_name = other.column_ttls_by_name;
|
|
|
|
table_ttl = other.table_ttl;
|
|
|
|
if (other.settings_changes)
|
|
|
|
settings_changes = other.settings_changes->clone();
|
|
|
|
else
|
|
|
|
settings_changes.reset();
|
|
|
|
select = other.select;
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
2020-06-12 09:37:52 +00:00
|
|
|
|
2020-02-14 13:17:50 +00:00
|
|
|
}
|