2018-03-19 11:45:17 +00:00
|
|
|
#include <Columns/ColumnWithDictionary.h>
|
|
|
|
#include <DataStreams/ColumnGathererStream.h>
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
2018-03-29 14:04:24 +00:00
|
|
|
ColumnWithDictionary::ColumnWithDictionary(MutableColumnPtr && column_unique_, MutableColumnPtr && indexes_)
|
|
|
|
: column_unique(std::move(column_unique_)), indexes(std::move(indexes_))
|
2018-03-19 11:45:17 +00:00
|
|
|
{
|
|
|
|
if (!dynamic_cast<const IColumnUnique *>(column_unique.get()))
|
|
|
|
throw Exception("ColumnUnique expected as argument of ColumnWithDictionary.", ErrorCodes::ILLEGAL_COLUMN);
|
|
|
|
}
|
|
|
|
|
|
|
|
ColumnWithDictionary::ColumnWithDictionary(const ColumnWithDictionary & other)
|
|
|
|
: column_unique(other.column_unique), indexes(other.indexes)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ColumnWithDictionary::gather(ColumnGathererStream & gatherer)
|
|
|
|
{
|
|
|
|
gatherer.gather(*this);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|