From a57f9967700fc1cfc48a8867bf17cec39fc5eabf Mon Sep 17 00:00:00 2001 From: Andrey Mironov Date: Tue, 8 Dec 2015 12:16:09 +0300 Subject: [PATCH] dbms: fix transform() accepting non constant second argument --- dbms/include/DB/Functions/FunctionsTransform.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbms/include/DB/Functions/FunctionsTransform.h b/dbms/include/DB/Functions/FunctionsTransform.h index 62650874989..353cb61a7e9 100644 --- a/dbms/include/DB/Functions/FunctionsTransform.h +++ b/dbms/include/DB/Functions/FunctionsTransform.h @@ -129,7 +129,7 @@ public: const ColumnConstArray * array_from = typeid_cast(&*block.getByPosition(arguments[1]).column); const ColumnConstArray * array_to = typeid_cast(&*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);