mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
CLICKHOUSE-4652 Another fix for АrrayEnumerateUniqRanked with empty arrays
This commit is contained in:
parent
45982253cd
commit
8ce32897fa
@ -357,6 +357,7 @@ void FunctionArrayEnumerateRankedExtended<Derived>::executeMethodImpl(
|
||||
{
|
||||
last_offset_by_depth[depth] = (*offsets_by_depth[depth])[current_offset_n_by_depth[depth]];
|
||||
++current_offset_n_by_depth[depth];
|
||||
want_clear = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -284,3 +284,6 @@ a1,a2 12 [1,2]
|
||||
[[1],[],[2],[],[3],[],[4],[],[5],[],[6],[],[7],[],[8],[],[9]]
|
||||
[[],[1],[],[2],[],[3],[],[4],[],[5],[],[6],[],[7],[],[8]]
|
||||
[[1],[2],[],[3]]
|
||||
-- empty corner
|
||||
[[],[1],[]] [[],[1],[]]
|
||||
[[1]] [[1]]
|
||||
|
@ -313,3 +313,6 @@ SELECT arrayEnumerateUniqRanked([[1], [], [1]]);
|
||||
SELECT arrayEnumerateUniqRanked([[1], [], [1], [], [1], [], [1], [], [1], [], [1], [], [1], [], [1], [], [1]]);
|
||||
SELECT arrayEnumerateUniqRanked([[], [1], [], [1], [], [1], [], [1], [], [1], [], [1], [], [1], [], [1]]);
|
||||
SELECT arrayEnumerateUniqRanked([[1], [1], [], [1]]);
|
||||
|
||||
select '-- empty corner';
|
||||
SELECT a, arrayEnumerateUniqRanked(a) FROM ( SELECT * FROM ( SELECT [[],[1],[]] AS a UNION ALL SELECT [[1]] AS a ) ORDER BY a ASC );
|
||||
|
Loading…
Reference in New Issue
Block a user