From 021379bc356601d532bde5c6473eb6fe64e6a653 Mon Sep 17 00:00:00 2001 From: Robert Schulze Date: Thu, 28 Nov 2024 12:31:03 +0100 Subject: [PATCH] Update LeastGreatestGeneric.h --- src/Functions/LeastGreatestGeneric.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Functions/LeastGreatestGeneric.h b/src/Functions/LeastGreatestGeneric.h index e1ca7dc66dcc..aa4720a4e3ef 100644 --- a/src/Functions/LeastGreatestGeneric.h +++ b/src/Functions/LeastGreatestGeneric.h @@ -49,12 +49,11 @@ class FunctionLeastGreatestGeneric : public IFunction ColumnPtr executeImpl(const ColumnsWithTypeAndName & arguments, const DataTypePtr & result_type, size_t input_rows_count) const override { - size_t num_arguments = arguments.size(); - if (1 == num_arguments) + if (arguments.size() == 1) return arguments[0].column; Columns converted_columns; - for (size_t arg = 0; arg < num_arguments; ++arg) + for (size_t arg = 0; arg < arguments.size(); ++arg) { if (arguments[arg].type->onlyNull()) continue; /// ignore NULL arguments