mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-15 10:52:30 +00:00
31 lines
696 B
C++
31 lines
696 B
C++
#include <IO/ReadHelpers.h>
|
|
#include <IO/WriteHelpers.h>
|
|
|
|
#include <Columns/ColumnsNumber.h>
|
|
#include <DataTypes/DataTypeDate.h>
|
|
#include <DataTypes/Serializations/SerializationDate.h>
|
|
#include <DataTypes/DataTypeFactory.h>
|
|
|
|
#include <Common/assert_cast.h>
|
|
|
|
|
|
namespace DB
|
|
{
|
|
|
|
bool DataTypeDate::equals(const IDataType & rhs) const
|
|
{
|
|
return typeid(rhs) == typeid(*this);
|
|
}
|
|
|
|
SerializationPtr DataTypeDate::doGetDefaultSerialization() const
|
|
{
|
|
return std::make_shared<SerializationDate>();
|
|
}
|
|
|
|
void registerDataTypeDate(DataTypeFactory & factory)
|
|
{
|
|
factory.registerSimpleDataType("Date", [] { return DataTypePtr(std::make_shared<DataTypeDate>()); }, DataTypeFactory::CaseInsensitive);
|
|
}
|
|
|
|
}
|