-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Fix cohorts clickhouse #2052
Fix cohorts clickhouse #2052
Conversation
ee/clickhouse/models/property.py
Outdated
filter_query, filter_params = prop_filter_json_extract(prop, idx, "{}person".format(prepend)) | ||
final += " AND distinct_id IN ({filter_query})".format( | ||
filter_query=GET_DISTINCT_IDS_BY_PROPERTY_SQL.format( | ||
filters=filter_query, negation="" if prop.operator and "not" in prop.operator else "" |
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'm might be wrong because the tests pass but something could be double negated here. Since prop_filter_json_extract should provide a query that includes 'NOT', there should be no need for negation here because before the conditions didn't include NOT directly and relied on this outside negation
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.
oh i see you removed the NOT, so this entire clause can be removed
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.
Great spot! Done and merged :)
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.
lgtm, just have to remove that empty clause
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.
Changes
Checklist