From 0436e0f8f145c331dcec224d478ac6d80ef60680 Mon Sep 17 00:00:00 2001 From: filipe Date: Sat, 3 Oct 2020 20:50:44 -0300 Subject: [PATCH] fix style and pvs check --- src/Functions/FunctionsFormatting.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Functions/FunctionsFormatting.h b/src/Functions/FunctionsFormatting.h index 809959d96ae..b2de00516cc 100644 --- a/src/Functions/FunctionsFormatting.h +++ b/src/Functions/FunctionsFormatting.h @@ -452,11 +452,12 @@ private: if (arguments.size() == 2) { const ColumnPtr & maximum_unit_column = block.getByPosition(arguments[1]).column; - if (const ColumnConst * maximum_unit_const_col = checkAndGetColumnConstStringOrFixedString(maximum_unit_column.get())) + const ColumnConst * maximum_unit_const_col = checkAndGetColumnConstStringOrFixedString(maximum_unit_column.get()); + if (maximum_unit_const_col) maximum_unit = maximum_unit_const_col->getValue(); else throw Exception( - "Illegal column " + arguments[1].get()->getName() + " of argument of function " + getName(), ErrorCodes::ILLEGAL_COLUMN); + "Illegal column " + maximum_unit_const_col->getName() + " of argument of function " + getName(), ErrorCodes::ILLEGAL_COLUMN); } if (const ColumnVector * col_from = checkAndGetColumn>(block.getByPosition(arguments[0]).column.get()))