-
Notifications
You must be signed in to change notification settings - Fork 7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support events qualified for multiple conditions. #2801
Conversation
if (event_level) | ||
{ | ||
this->data(place).add(static_cast<const ColumnVector<UInt32> *>(columns[0])->getData()[row_num], event_level); | ||
this->data(place).add(timestamp, i); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, but how to avoid duplicate match?
Eg.
windowFunnel(4)(timestamp, event <= 2, event <=4, event <=6, event <=8)
There's just one row data with event = 2
, but it could have the result 4.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, I answered that question in the related comment :-) lemme expand that here with your example.
Consider a table with timestamp : 1 and event : 1
with this windowFunnel(4)(timestamp, event <= 2, event <=4, event <=6, event <=8)
invocation, it generates four entries in the event list with the order (1001, 4), (1001, 3), (1001, 2), (1001, 1)
and this order is kept via stable sort. (Note, merging sort itself is stable too). Thus, when doing forward scan over the event list, no duplication result would be generated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got it, nice solution.
074e4f7
to
972b18b
Compare
665b375
to
853e465
Compare
Currently windowFunnel function only take the first qualified condition into account when operating on one event. This patch extends the ability.
@amosbird Hi! Thanks for your PR! Your code has problems with test(00678_shard_funnel_window). I try to fix it. |
@VadimPE Hi, I didn't see failures in test 678 and there isn't a related commit in recent commit log. What problem is it? |
In this case old version: 1 10000 |
Well that's expected. The correct output should be
Old version doesn't work when the some filter includes others, and this is what my patch meant to fix. |
Currently windowFunnel function only takes the first qualified event condition
into account when operating on one event. This patch extends the
ability.
I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en