mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 09:32:06 +00:00
Merge pull request #18817 from ucasFL/wf
replace PODArray with PODArrayWithStackMemory in AggregateFunctionWindowFunnelData
This commit is contained in:
commit
fe1c153c6f
@ -33,7 +33,7 @@ template <typename T>
|
|||||||
struct AggregateFunctionWindowFunnelData
|
struct AggregateFunctionWindowFunnelData
|
||||||
{
|
{
|
||||||
using TimestampEvent = std::pair<T, UInt8>;
|
using TimestampEvent = std::pair<T, UInt8>;
|
||||||
using TimestampEvents = PODArray<TimestampEvent, 64>;
|
using TimestampEvents = PODArrayWithStackMemory<TimestampEvent, 64>;
|
||||||
using Comparator = ComparePairFirst;
|
using Comparator = ComparePairFirst;
|
||||||
|
|
||||||
bool sorted = true;
|
bool sorted = true;
|
||||||
|
12
tests/performance/optimize_window_funnel.xml
Normal file
12
tests/performance/optimize_window_funnel.xml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<test>
|
||||||
|
<create_query>CREATE TABLE action(uid UInt64, event String, time DateTime) ENGINE = MergeTree ORDER BY uid</create_query>
|
||||||
|
|
||||||
|
<fill_query>INSERT INTO action SELECT arrayJoin(groupArray(number)), 'a', now() from numbers(1000000)</fill_query>
|
||||||
|
<fill_query>INSERT INTO action SELECT arrayJoin(groupArray(number)), 'b', now() + INTERVAL 6 hour from numbers(1000000)</fill_query>
|
||||||
|
<fill_query>INSERT INTO action SELECT arrayJoin(groupArray(number)), 'c', now() + INTERVAL 12 hour from numbers(1000000)</fill_query>
|
||||||
|
<fill_query>INSERT INTO action SELECT arrayJoin(groupArray(number)), 'd', now() + INTERVAL 18 hour from numbers(1000000)</fill_query>
|
||||||
|
|
||||||
|
<query>SELECT level, count() from (select windowFunnel(86400)(time, event='a', event='b', event='c', event='d') level from action group by uid) group by level FORMAT Null</query>
|
||||||
|
|
||||||
|
<drop_query>DROP TABLE IF EXISTS action</drop_query>
|
||||||
|
</test>
|
Loading…
Reference in New Issue
Block a user