posthog
posthog copied to clipboard
feat(hogql): ignore future persons
Problem
https://posthog.slack.com/archives/C02E3BKC78F/p1716558850878309?thread_ts=1716503393.145799&cid=C02E3BKC78F
Changes
Exclude persons with future created_at dates
Does this work well for both Cloud and self-hosted?
I hope so.
How did you test this code?
CI + snapshots.
Running select * from persons under /debug adds the following: ifNull(less(person.created_at, plus(now64(6, %(hogql_val_6)s), toIntervalDay(1))), 0))
Any query anywhere selecting persons will now have this applied to the subquery we make. See the generated SQL here.