dbms: fix transform() accepting non constant second argument

This commit is contained in:
Andrey Mironov 2015-12-08 12:16:09 +03:00
parent d4b44f5570
commit a57f996770

View File

@ -129,7 +129,7 @@ public:
const ColumnConstArray * array_from = typeid_cast<const ColumnConstArray *>(&*block.getByPosition(arguments[1]).column);
const ColumnConstArray * array_to = typeid_cast<const ColumnConstArray *>(&*block.getByPosition(arguments[2]).column);
if (!array_from && !array_to)
if (!array_from || !array_to)
throw Exception("Second and third arguments of function " + getName() + " must be constant arrays.", ErrorCodes::ILLEGAL_COLUMN);
prepare(array_from->getData(), array_to->getData(), block, arguments);