ClickHouse: windowFunnel outputs wrong level if the event list are the same

This problem was first reported in #21835. However, the PR mentioned in that issues only solved the problem described in Test 2.

For Test 3 described in the original issue, this problem still exists. Since the original issue was closed, I open a new one.

For example shown as below, the window is 50, and time different between the two records are 100, so the output level should be 1 instead of 2.

SELECT
    uid,
    windowFunnel(50)(toUInt32(event_ms), event_id = 1, event_id = 1) AS level
FROM
(
    SELECT
        data.1 AS event_id,
        data.2 AS event_ms,
        data.3 AS uid
    FROM
    (
        SELECT arrayJoin([(1, 100, 123), (1, 200, 345)]) AS data
    )
)
WHERE (event_ms >= 0) AND (event_ms <= 300)
GROUP BY uid

Query id: 96c1a056-2975-41a5-8f30-41ad1a8c249a

┌─uid─┬─level─┐
│ 123 │     2 │
│ 345 │     2 │
└─────┴───────┘


SELECT version()

Query id: 33f14eaf-1e61-4847-986e-c540c659f8cb

┌─version()─┐
│ 22.2.1.1  │
└───────────┘

1 rows in set. Elapsed: 0.009 sec. 

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Reactions: 1
  • Comments: 15 (6 by maintainers)

Most upvoted comments

I will check it out. @FrankChen021 @alexey-milovidov

Same issue here as well, is there any update? Thank you.

@achimbab Sorry for pushing, but do you have any update on this issue?

Hi @achimbab Any update on this?