ClickHouse/src/DataTypes/DataTypeNothing.cpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

32 lines
693 B
C++
Raw Normal View History

2021-03-09 14:10:28 +00:00
#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>()); });
}
}