From 0c4da85e750f146d3094581e816a192a61697bab Mon Sep 17 00:00:00 2001 From: Robert Schulze Date: Wed, 6 Jul 2022 14:29:42 +0000 Subject: [PATCH] More uniform naming --- .../FunctionsMultiStringFuzzySearch.h | 20 +++++++++---------- src/Functions/FunctionsMultiStringSearch.h | 12 +++++------ 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/Functions/FunctionsMultiStringFuzzySearch.h b/src/Functions/FunctionsMultiStringFuzzySearch.h index 1e13b300136..7e2d004070b 100644 --- a/src/Functions/FunctionsMultiStringFuzzySearch.h +++ b/src/Functions/FunctionsMultiStringFuzzySearch.h @@ -65,26 +65,26 @@ public: ColumnPtr executeImpl(const ColumnsWithTypeAndName & arguments, const DataTypePtr &, size_t /*input_rows_count*/) const override { - const ColumnPtr & column_haystack = arguments[0].column; - const ColumnPtr & num_ptr = arguments[1].column; - const ColumnPtr & arr_ptr = arguments[2].column; + const ColumnPtr & haystack_ptr = arguments[0].column; + const ColumnPtr & edit_distance_ptr = arguments[1].column; + const ColumnPtr & needles_ptr = arguments[2].column; - const ColumnString * col_haystack_vector = checkAndGetColumn(&*column_haystack); - const ColumnConst * col_haystack_const = typeid_cast(&*column_haystack); + const ColumnString * col_haystack_vector = checkAndGetColumn(&*haystack_ptr); + const ColumnConst * col_haystack_const = typeid_cast(&*haystack_ptr); assert(static_cast(col_haystack_vector) ^ static_cast(col_haystack_const)); UInt32 edit_distance = 0; - if (const auto * col_const_uint8 = checkAndGetColumnConst(num_ptr.get())) + if (const auto * col_const_uint8 = checkAndGetColumnConst(edit_distance_ptr.get())) edit_distance = col_const_uint8->getValue(); - else if (const auto * col_const_uint16 = checkAndGetColumnConst(num_ptr.get())) + else if (const auto * col_const_uint16 = checkAndGetColumnConst(edit_distance_ptr.get())) edit_distance = col_const_uint16->getValue(); - else if (const auto * col_const_uint32 = checkAndGetColumnConst(num_ptr.get())) + else if (const auto * col_const_uint32 = checkAndGetColumnConst(edit_distance_ptr.get())) edit_distance = col_const_uint32->getValue(); else throw Exception(ErrorCodes::ILLEGAL_COLUMN, "Illegal column {}. The number is not const or does not fit in UInt32", arguments[1].column->getName()); - const ColumnArray * col_needles = checkAndGetColumn(arr_ptr.get()); - const ColumnConst * col_needles_const = checkAndGetColumnConst(arr_ptr.get()); + const ColumnArray * col_needles = checkAndGetColumn(needles_ptr.get()); + const ColumnConst * col_needles_const = checkAndGetColumnConst(needles_ptr.get()); assert(static_cast(col_needles) ^ static_cast(col_needles_const)); if (col_haystack_const && col_needles) diff --git a/src/Functions/FunctionsMultiStringSearch.h b/src/Functions/FunctionsMultiStringSearch.h index 1a47a54c04c..560fe1313e2 100644 --- a/src/Functions/FunctionsMultiStringSearch.h +++ b/src/Functions/FunctionsMultiStringSearch.h @@ -77,15 +77,15 @@ public: ColumnPtr executeImpl(const ColumnsWithTypeAndName & arguments, const DataTypePtr &, size_t /*input_rows_count*/) const override { - const ColumnPtr & column_haystack = arguments[0].column; - const ColumnPtr & arr_ptr = arguments[1].column; + const ColumnPtr & haystack_ptr = arguments[0].column; + const ColumnPtr & needles_ptr = arguments[1].column; - const ColumnString * col_haystack_vector = checkAndGetColumn(&*column_haystack); - const ColumnConst * col_haystack_const = typeid_cast(&*column_haystack); + const ColumnString * col_haystack_vector = checkAndGetColumn(&*haystack_ptr); + const ColumnConst * col_haystack_const = typeid_cast(&*haystack_ptr); assert(static_cast(col_haystack_vector) ^ static_cast(col_haystack_const)); - const ColumnArray * col_needles = checkAndGetColumn(arr_ptr.get()); - const ColumnConst * col_needles_const = checkAndGetColumnConst(arr_ptr.get()); + const ColumnArray * col_needles = checkAndGetColumn(needles_ptr.get()); + const ColumnConst * col_needles_const = checkAndGetColumnConst(needles_ptr.get()); assert(static_cast(col_needles) ^ static_cast(col_needles_const)); if (col_haystack_const && col_needles)