mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-17 20:02:05 +00:00
32 lines
693 B
C++
32 lines
693 B
C++
#include <DataTypes/DataTypeNothing.h>
|
|
#include <DataTypes/Serializations/SerializationNothing.h>
|
|
#include <DataTypes/DataTypeFactory.h>
|
|
#include <Columns/ColumnNothing.h>
|
|
|
|
|
|
namespace DB
|
|
{
|
|
|
|
MutableColumnPtr DataTypeNothing::createColumn() const
|
|
{
|
|
return ColumnNothing::create(0);
|
|
}
|
|
|
|
bool DataTypeNothing::equals(const IDataType & rhs) const
|
|
{
|
|
return typeid(rhs) == typeid(*this);
|
|
}
|
|
|
|
SerializationPtr DataTypeNothing::doGetDefaultSerialization() const
|
|
{
|
|
return std::make_shared<SerializationNothing>();
|
|
}
|
|
|
|
|
|
void registerDataTypeNothing(DataTypeFactory & factory)
|
|
{
|
|
factory.registerSimpleDataType("Nothing", [] { return DataTypePtr(std::make_shared<DataTypeNothing>()); });
|
|
}
|
|
|
|
}
|