ClickHouse/dbms/DataTypes/DataTypeSet.h

31 lines
880 B
C++
Raw Normal View History

2012-08-23 18:05:31 +00:00
#pragma once
#include <DataTypes/IDataTypeDummy.h>
#include <Columns/ColumnSet.h>
2012-08-23 18:05:31 +00:00
namespace DB
{
/** The data type corresponding to the set of values in the IN section.
* Used only as an intermediate when evaluating expressions.
2012-08-23 18:05:31 +00:00
*/
2015-06-09 18:58:18 +00:00
class DataTypeSet final : public IDataTypeDummy
2012-08-23 18:05:31 +00:00
{
public:
static constexpr bool is_parametric = true;
const char * getFamilyName() const override { return "Set"; }
TypeIndex getTypeId() const override { return TypeIndex::Set; }
bool equals(const IDataType & rhs) const override { return typeid(rhs) == typeid(*this); }
bool isParametric() const override { return true; }
2019-10-27 18:12:40 +00:00
// Used for expressions analysis.
MutableColumnPtr createColumn() const override { return ColumnSet::create(0, nullptr); }
2019-10-27 18:12:40 +00:00
// Used only for debugging, making it DUMPABLE
Field getDefault() const override { return Tuple(); }
2012-08-23 18:05:31 +00:00
};
}