mirror of
https://github.com/PostHog/posthog.git
synced 2024-11-22 08:40:03 +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> |
||
---|---|---|
.. | ||
api | ||
benchmarks | ||
bin | ||
certs | ||
clickhouse | ||
idl | ||
kafka_client | ||
management/commands | ||
migrations | ||
models | ||
tasks | ||
__init__.py | ||
apps.py | ||
conftest.py | ||
docker-compose.ch.arm64.yml | ||
docker-compose.ch.test.yml | ||
docker-compose.ch.yml | ||
LICENSE | ||
pytest.ini | ||
settings.py | ||
urls.py |