mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-17 13:13:36 +00:00
25 lines
733 B
C++
25 lines
733 B
C++
#include <Columns/ColumnWithDictionary.h>
|
|
#include <DataStreams/ColumnGathererStream.h>
|
|
|
|
namespace DB
|
|
{
|
|
|
|
ColumnWithDictionary::ColumnWithDictionary(MutableColumnPtr && column_unique_, MutableColumnPtr && indexes_)
|
|
: column_unique(std::move(column_unique_)), indexes(std::move(indexes_))
|
|
{
|
|
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);
|
|
}
|
|
|
|
}
|