diff --git a/src/Functions/FunctionsHashing.h b/src/Functions/FunctionsHashing.h index b78ecb5c72a..750c247b518 100644 --- a/src/Functions/FunctionsHashing.h +++ b/src/Functions/FunctionsHashing.h @@ -987,7 +987,8 @@ private: const size_t nested_size = nested_column->size(); typename ColumnVector::Container vec_temp(nested_size); - executeAny(nested_type, nested_column, vec_temp); + bool nested_is_first = true; + executeForArgument(nested_type, nested_column, vec_temp, nested_is_first); const size_t size = offsets.size(); @@ -1058,8 +1059,7 @@ private: else if (which.isString()) executeString(icolumn, vec_to); else if (which.isFixedString()) executeString(icolumn, vec_to); else if (which.isArray()) executeArray(from_type, icolumn, vec_to); - else - executeGeneric(icolumn, vec_to); + else executeGeneric(icolumn, vec_to); } void executeForArgument(const IDataType * type, const IColumn * column, typename ColumnVector::Container & vec_to, bool & is_first) const diff --git a/tests/queries/0_stateless/02292_hash_array_tuples.reference b/tests/queries/0_stateless/02292_hash_array_tuples.reference new file mode 100644 index 00000000000..52d52b54a5c --- /dev/null +++ b/tests/queries/0_stateless/02292_hash_array_tuples.reference @@ -0,0 +1,5 @@ +14617701568871014978 +12913842429399915005 +8351543757058688770 +12732328028874882204 +12371801021764949421 Array(Tuple(UInt8, Array(Tuple(UInt8, Tuple(UInt8, UInt8, Array(Tuple(UInt8, UInt8))))))) diff --git a/tests/queries/0_stateless/02292_hash_array_tuples.sql b/tests/queries/0_stateless/02292_hash_array_tuples.sql new file mode 100644 index 00000000000..31c409dc6ba --- /dev/null +++ b/tests/queries/0_stateless/02292_hash_array_tuples.sql @@ -0,0 +1,6 @@ +SELECT cityHash64([(1, 'a'), (2, 'b')]); +SELECT cityHash64([(1, 'c'), (2, 'b')]); +SELECT sipHash64([(1, 'a'), (2, 'b')]); +SELECT murmurHash2_64([(1, 'a'), (2, 'b'), (3, 'c')]); + +SELECT cityHash64([(1, [(1, (3, 4, [(5, 6), (7, 8)]))]), (2, [])] AS c), toTypeName(c);