mirror of
https://github.com/PostHog/posthog.git
synced 2024-11-28 18:26:15 +01:00
d9bc06b7dd
* refactor(lifecycle): simplify clickhouse sql logic This updates the SQL to be comprised of two queries, one for getting new, returning, and resurrecting periods of activity, one for getting dormant periods right after periods of activity. Refers to https://github.com/PostHog/posthog/issues/7382 * refactor(lifecyle): use `ClickhouseEventQuery` to build event query * format * Use bounded_person_activity_by_period for both sides of dormant join * refactor(lifecycle): reduce pdi2 join by one This means we're now under the current query memory limit for orgs with around 20m distinct_ids. It does remove some readability though :( * update snapshot * Add further comments to query * Add further comments to query * Add further comments to query * Remove dead variables * Refactor person_query overriding * Lifecycle refactoring continued * Update lifecycle tests (except people ones) * Make lifecycle people endpoint happy * Remove django lifecycle tests * Add some edge case tests * Add missing type Co-authored-by: Harry Waye <harry@posthog.com> |
||
---|---|---|
.. | ||
test | ||
__init__.py | ||
breakdown.py | ||
clickhouse_trends.py | ||
formula.py | ||
lifecycle.py | ||
person.py | ||
total_volume.py | ||
trend_event_query.py | ||
util.py |