2012-08-23 18:05:31 +00:00
|
|
|
#pragma once
|
|
|
|
|
2017-04-01 09:19:00 +00:00
|
|
|
#include <DataTypes/IDataTypeDummy.h>
|
2020-01-15 18:18:50 +00:00
|
|
|
#include <Columns/ColumnSet.h>
|
2012-08-23 18:05:31 +00:00
|
|
|
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
2017-05-09 19:07:35 +00:00
|
|
|
/** The data type corresponding to the set of values in the IN section.
|
2017-07-16 03:05:40 +00:00
|
|
|
* 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:
|
2017-10-30 02:18:06 +00:00
|
|
|
static constexpr bool is_parametric = true;
|
2017-07-16 03:05:40 +00:00
|
|
|
const char * getFamilyName() const override { return "Set"; }
|
2018-09-07 14:37:26 +00:00
|
|
|
TypeIndex getTypeId() const override { return TypeIndex::Set; }
|
2017-12-23 01:05:29 +00:00
|
|
|
bool equals(const IDataType & rhs) const override { return typeid(rhs) == typeid(*this); }
|
2017-12-09 06:32:22 +00:00
|
|
|
bool isParametric() const override { return true; }
|
2019-10-27 18:12:40 +00:00
|
|
|
|
2020-01-15 18:18:50 +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
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|