posthog
posthog copied to clipboard
feat(hogql): replace filters with query backend side
trafficstars
Problem
We want to replace filters with queries.
Changes
This PR replaces filters with a query (by converting them) based on a feature flag. This allows us to find places that break when replacing filters with queries.
Known issues after a quick test:
- [ ] Saving an insight does not work any more
- [ ] Dashboard tiles are layouted differently (they probably don't know that they are an insight or the nesting in InsightVizNode breaks them)
Does this work well for both Cloud and self-hosted?
The flag should default to False in a self-hosted environment.
Todos
- [ ] nesting in insight viz node yes/no?
- [ ] migration check is broken?
- [ ] add tests
- [ ] test saving an insight
- [ ] test adding an insight to a dashboard
- [ ] test editing an insight
- [ ] test adding/editing/viewing a hogql insight
How did you test this code?
Be sure to start the dev server with POSTHOG_PERSONAL_API_KEY set.
Size Change: -6 B (0%)
Total Size: 1.04 MB
ℹ️ View Unchanged
| Filename | Size | Change |
|---|---|---|
frontend/dist/toolbar.js |
1.04 MB | -6 B (0%) |
Closing in favour of https://github.com/PostHog/posthog/pull/21945