Hi guys, 
I found that kylin supported retention rate analyze function, so I made some 
test for this function. The following SQL executed successful:
-----------------------------------------------------------------------------------------------------------------------
select city, version,
intersect_count(uuid, dt, array['20161014']) as first_day,
intersect_count(uuid, dt, array['20161015']) as second_day,
intersect_count(uuid, dt, array['20161016']) as third_day,
intersect_count(uuid, dt, array['20161014', '20161015']) as retention_oneday,
intersect_count(uuid, dt, array['20161014', '20161015', '20161016']) as 
retention_twoday
from visit_log
where dt in ('2016104', '20161015', '20161016')
group by city, version
-----------------------------------------------------------------------------------------------------------------------
but, other SQLs executed failed like this:
-----------------------------------------------------------------------------------------------------------------------
select city, version, intersect_count(uuid, dt, array['20161014', '20161015']) 
as retention_oneday
from visit_log where dt in ('2016104', '20161015',) group by city, version
-----------------------------------------------------------------------------------------------------------------------
select city, version,intersect_count(uuid, dt, array['20161014', '20161015', 
'20161016']) as retention_twoday
from visit_log where dt in ('2016104', '20161015', '20161016') group by city, 
version
-----------------------------------------------------------------------------------------------------------------------
which means I cannot use just one intersect_count UDAF in a SQL, at lease two 
intersect_count, is this a bug or designed to do so?

2017-12-07


skyyws 

Reply via email to