diff --git a/dbms/include/DB/Columns/ColumnConst.h b/dbms/include/DB/Columns/ColumnConst.h index d04002c84ba..6ddd4bafd52 100644 --- a/dbms/include/DB/Columns/ColumnConst.h +++ b/dbms/include/DB/Columns/ColumnConst.h @@ -127,8 +127,8 @@ typedef ColumnConst ColumnConstArray; template ColumnConst::ColumnConst(size_t s_, const T & data_) : s(s_), data(data_) {} template ColumnConst::ColumnConst(size_t s_, const T & data_, DataTypePtr nested_type_) { throw Exception("Can't create non-array ColumnConst with nested type", ErrorCodes::LOGICAL_ERROR); } -template <> ColumnConst::ColumnConst(size_t s_, const Array & data_) { throw Exception("Can't create ColumnConst without nested type", ErrorCodes::LOGICAL_ERROR); } -template <> ColumnConst::ColumnConst(size_t s_, const Array & data_, DataTypePtr nested_type_) : s(s_), data(data_), nested_type(nested_type_) {} +template <> ColumnConst::ColumnConst(size_t s_, const Array & data_); +template <> ColumnConst::ColumnConst(size_t s_, const Array & data_, DataTypePtr nested_type_); template ColumnPtr ColumnConst::convertToFullColumn() const diff --git a/dbms/src/Columns/ColumnConst.cpp b/dbms/src/Columns/ColumnConst.cpp index 97f820d2e09..276b4d3cea4 100644 --- a/dbms/src/Columns/ColumnConst.cpp +++ b/dbms/src/Columns/ColumnConst.cpp @@ -6,6 +6,10 @@ namespace DB { + +template <> ColumnConst::ColumnConst(size_t s_, const Array & data_) { throw Exception("Can't create ColumnConst without nested type", ErrorCodes::LOGICAL_ERROR); } +template <> ColumnConst::ColumnConst(size_t s_, const Array & data_, DataTypePtr nested_type_) : s(s_), data(data_), nested_type(nested_type_) {} + template <> ColumnPtr ColumnConst::convertToFullColumn() const { @@ -48,4 +52,5 @@ template <> ColumnPtr ColumnConst::convertToFullColumn() const return res; } + }