-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Closed
Labels
kind/fixCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.
Milestone
Description
Describe the bug
The following sql cause doris return wrong value:
SELECT DATE(event_day) AS __timestamp,
if (true, HLL_UNION_AGG(uv),count(distinc(cuid)))
FROM visd_novel_searchbox_operate_hll
WHERE event_day >= STR_TO_DATE('2019-03-15 00:00:00', '%Y-%m-%d %H:%i:%s') AND
event_day <= STR_TO_DATE('2019-03-22 00:00:00', '%Y-%m-%d %H:%i:%s') AND
((bdcloud_module_app_name = 'tcbox' and bdcloud_cateid = 1 and evtType = 'show' and evtName = 'novel-detail'))
GROUP BY DATE(event_day)
LIMIT 100;
To Reproduce
Steps to reproduce the behavior:
- Use COUNT and HLL_UNION_AGG in a column with function like IF or COALESCE. For example:
IF (true, HLL_UNION_AGG(uv),count(distinct cuid))
IF(HLL_UNION_AGG(uv)!=count(distinct cuid), HLL_UNION_AGG(uv),count(distinct cuid))
COALESCE(IF(count(distinct cuid)>1, count(distinct cuid), null), HLL_UNION_AGG(uv))
- The function always return 1.
Expected behavior
return correct value
Metadata
Metadata
Assignees
Labels
kind/fixCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.
