mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 01:51:59 +00:00
Fix trivial bug in arrayEnumerateUniq
This commit is contained in:
parent
10160e5adf
commit
b3944006cb
@ -353,6 +353,9 @@ bool FunctionArrayEnumerateExtended<Derived>::execute128bit(
|
|||||||
keys_bytes += key_sizes[j];
|
keys_bytes += key_sizes[j];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (keys_bytes > 16)
|
||||||
|
return false;
|
||||||
|
|
||||||
executeMethod<MethodFixed>(offsets, columns, key_sizes, nullptr, res_values);
|
executeMethod<MethodFixed>(offsets, columns, key_sizes, nullptr, res_values);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,2 @@
|
|||||||
|
[1,1,2]
|
||||||
|
[1,1,1]
|
13
tests/queries/0_stateless/01677_array_enumerate_bug.sql
Normal file
13
tests/queries/0_stateless/01677_array_enumerate_bug.sql
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
-- there was a bug - missing check of the total size of keys for the case with hash table with 128bit key.
|
||||||
|
|
||||||
|
SELECT arrayEnumerateUniq(arrayEnumerateUniq([toInt256(10), toInt256(100), toInt256(2)]), [toInt256(123), toInt256(1023), toInt256(123)]);
|
||||||
|
|
||||||
|
SELECT arrayEnumerateUniq(
|
||||||
|
[111111, 222222, 333333],
|
||||||
|
[444444, 555555, 666666],
|
||||||
|
[111111, 222222, 333333],
|
||||||
|
[444444, 555555, 666666],
|
||||||
|
[111111, 222222, 333333],
|
||||||
|
[444444, 555555, 666666],
|
||||||
|
[111111, 222222, 333333],
|
||||||
|
[444444, 555555, 666666]);
|
Loading…
Reference in New Issue
Block a user