You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cat w.sql
drop table if exists simple_agf_summing_mt;
create table simple_agf_summing_mt (a Int64,
grp_aggreg AggregateFunction(groupUniqArrayArray, Array(UInt64)),
grp_simple SimpleAggregateFunction(groupUniqArrayArray, Array(UInt64))
) engine = SummingMergeTree() order by a;
insert into simple_agf_summing_mt select 1 a,
groupUniqArrayArrayState([toUInt64(number)]),
groupUniqArrayArray([toUInt64(number)])
from numbers(1)
group by a;
insert into simple_agf_summing_mt select 1 a,
groupUniqArrayArrayState([toUInt64(number)]),
groupUniqArrayArray([toUInt64(number)])
from numbers(2)
group by a;
optimize table simple_agf_summing_mt final;
SELECT arraySort(groupUniqArrayArrayMerge(grp_aggreg)) gra ,
arraySort(groupUniqArrayArray(grp_simple)) grs
FROM simple_agf_summing_mt
group by a;
clickhouse-client -mn <w.sql
[0,1] [0]
EXPECTED:
[0,1] [0,1]
AggregateFunction(groupUniqArrayArray & SimpleAggregateFunction(groupUniqArrayArray have to produce the same result [0,1]
Let's replace SummingMergeTree engine to AggregatingMergeTree:
cat ww.sqldroptable if exists simple_agf_summing_mt;
createtablesimple_agf_summing_mt (a Int64,
grp_aggreg AggregateFunction(groupUniqArrayArray, Array(UInt64)),
grp_simple SimpleAggregateFunction(groupUniqArrayArray, Array(UInt64))
) engine = AggregatingMergeTree() order by a;
insert into simple_agf_summing_mt select1 a,
groupUniqArrayArrayState([toUInt64(number)]),
groupUniqArrayArray([toUInt64(number)])
from numbers(1)
group by a;
insert into simple_agf_summing_mt select1 a,
groupUniqArrayArrayState([toUInt64(number)]),
groupUniqArrayArray([toUInt64(number)])
from numbers(2)
group by a;
optimize table simple_agf_summing_mt final;
SELECT
arraySort(groupUniqArrayArrayMerge(grp_aggreg)) gra ,
arraySort(groupUniqArrayArray(grp_simple)) grs
FROM simple_agf_summing_mt
group by a
cat ww.sql |clickhouse-client -mn
[0,1] [0,1]
The text was updated successfully, but these errors were encountered:
den-crane
added
bug
Confirmed user-visible misbehaviour in official release
bug-unreleased
Bug that affects unreleased or experimental code
and removed
bug
Confirmed user-visible misbehaviour in official release
labels
Dec 31, 2020
AggregateFunction(groupUniqArrayArray
&SimpleAggregateFunction(groupUniqArrayArray
have to produce the same result [0,1]Let's replace SummingMergeTree engine to
AggregatingMergeTree
:The text was updated successfully, but these errors were encountered: