posthog icon indicating copy to clipboard operation
posthog copied to clipboard

feat(hogql): replace filters with query backend side

Open thmsobrmlr opened this issue 1 year ago • 1 comments
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) Screenshot 2024-04-08 at 12 44 22

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.

Screenshot 2024-04-08 at 12 22 04

thmsobrmlr avatar Apr 08 '24 10:04 thmsobrmlr

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%)

compressed-size-action

github-actions[bot] avatar Apr 29 '24 07:04 github-actions[bot]

Closing in favour of https://github.com/PostHog/posthog/pull/21945

thmsobrmlr avatar Apr 30 '24 07:04 thmsobrmlr