mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-26 01:22:04 +00:00
Merge pull request #19788 from ClickHouse/array-enumerate-extended-bug
Fix trivial bug in arrayEnumerateUniq
This commit is contained in:
commit
0679d81c0d
@ -353,6 +353,9 @@ bool FunctionArrayEnumerateExtended<Derived>::execute128bit(
|
||||
keys_bytes += key_sizes[j];
|
||||
}
|
||||
|
||||
if (keys_bytes > 16)
|
||||
return false;
|
||||
|
||||
executeMethod<MethodFixed>(offsets, columns, key_sizes, nullptr, res_values);
|
||||
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