2017-12-07 08:31:47 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <Columns/IColumnDummy.h>
|
|
|
|
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
2019-04-19 20:21:17 +00:00
|
|
|
class ColumnNothing final : public COWHelper<IColumnDummy, ColumnNothing>
|
2017-12-07 08:31:47 +00:00
|
|
|
{
|
2017-12-14 03:56:56 +00:00
|
|
|
private:
|
2019-04-19 20:21:17 +00:00
|
|
|
friend class COWHelper<IColumnDummy, ColumnNothing>;
|
2017-12-14 04:25:22 +00:00
|
|
|
|
2017-12-15 02:36:40 +00:00
|
|
|
ColumnNothing(size_t s_)
|
|
|
|
{
|
|
|
|
s = s_;
|
|
|
|
}
|
2017-12-07 08:31:47 +00:00
|
|
|
|
2017-12-15 19:17:15 +00:00
|
|
|
ColumnNothing(const ColumnNothing &) = default;
|
|
|
|
|
2017-12-14 03:56:56 +00:00
|
|
|
public:
|
2017-12-07 22:11:51 +00:00
|
|
|
const char * getFamilyName() const override { return "Nothing"; }
|
2019-01-07 10:40:58 +00:00
|
|
|
MutableColumnPtr cloneDummy(size_t s_) const override { return ColumnNothing::create(s_); }
|
2017-12-09 10:14:45 +00:00
|
|
|
|
|
|
|
bool canBeInsideNullable() const override { return true; }
|
2019-03-14 23:10:51 +00:00
|
|
|
|
|
|
|
bool structureEquals(const IColumn & rhs) const override
|
|
|
|
{
|
|
|
|
return typeid(rhs) == typeid(ColumnNothing);
|
|
|
|
}
|
2017-12-07 08:31:47 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|