diff --git a/src/Functions/FunctionsExternalDictionaries.h b/src/Functions/FunctionsExternalDictionaries.h index afaf42bcecf..febb14a7723 100644 --- a/src/Functions/FunctionsExternalDictionaries.h +++ b/src/Functions/FunctionsExternalDictionaries.h @@ -512,10 +512,13 @@ public: } else { - key_columns = {key_column, range_col}; - key_types = {std::make_shared(), range_col_type}; + key_columns = {key_column}; + key_types = {std::make_shared()}; } + key_columns.emplace_back(range_col); + key_types.emplace_back(range_col_type); + result = executeDictionaryRequest( dictionary, attribute_names, diff --git a/tests/queries/0_stateless/02008_complex_key_range_hashed_dictionary.reference b/tests/queries/0_stateless/02008_complex_key_range_hashed_dictionary.reference index dfa00d0027c..41a12f88906 100644 --- a/tests/queries/0_stateless/02008_complex_key_range_hashed_dictionary.reference +++ b/tests/queries/0_stateless/02008_complex_key_range_hashed_dictionary.reference @@ -1,8 +1,8 @@ Dictionary not nullable dictGet -0.2 -0.2 -0.2 +0.33 +0.42 +0.46 0.2 0.4 dictHas @@ -29,9 +29,9 @@ onlySpecificColumn 0.46 Dictionary nullable dictGet -0.2 -0.2 -0.2 +0.33 +0.42 +\N 0.2 0.4 dictHas