From 9199910f77ac2c4931af9efa813a1d69e44bc7a4 Mon Sep 17 00:00:00 2001 From: Michal Tabaszewski Date: Tue, 29 Oct 2024 00:33:54 +0100 Subject: [PATCH] Fixed style check --- src/Functions/randDistribution.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Functions/randDistribution.cpp b/src/Functions/randDistribution.cpp index 06dac1b2818..3979c767e79 100644 --- a/src/Functions/randDistribution.cpp +++ b/src/Functions/randDistribution.cpp @@ -13,6 +13,7 @@ #include #include #include +#include #include @@ -224,10 +225,10 @@ private: "Parameter number ({}) is greater than the size of arguments ({}). This is a bug", parameter_number, arguments.size()); - const IColumn * col = arguments[parameter_number].column.get(); + const auto col = castColumnAccurate(arguments[parameter_number], std::make_shared()); std::optional parameter; - if (const auto * col_in = checkAndGetColumn>(col)) + if (const ColumnVector * const col_in = checkAndGetColumn>(col.get())) { parameter = *col_in->getData().data(); } @@ -236,7 +237,7 @@ private: parameter = applyVisitor(FieldVisitorConvertToNumber(), assert_cast(*col).getField()); } - if(!parameter.has_value()) + if (!parameter.has_value()) { auto expected_type = Field(Field::Types::Which(Field::TypeToEnum>::value)).getTypeName(); throw Exception(ErrorCodes::BAD_ARGUMENTS, "Parameter number {} of function {} is expected to be {} but is {}",