Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(hogql): query modifiers #17946

Merged
merged 10 commits into from
Oct 13, 2023
Merged

feat(hogql): query modifiers #17946

merged 10 commits into from
Oct 13, 2023

Conversation

mariusandra
Copy link
Collaborator

@mariusandra mariusandra commented Oct 12, 2023

Problem

We want the ability to enable/disable optimisations in HogQL as needed, including specifying them on the client side to shorten the feedback loop.

Changes

  • Introduces a central HogQLQueryModifiers interface that can be appended to a HogQLQuery node to specify the behaviour of query features.
  • Introduces a central modifiers.py -> create_default_modifiers_for_team for setting modifiers automatically
  • Moves personsOnEventsMode to the modifiers (camelCased python? 🤔 🤷)
  • Introduces the PoE option in the /debug endpoint

2023-10-12 12 17 31

Next steps

  • Newer persons query join as the next modifier
  • The C++ parser as another modifier
  • Hooking this up to feature flags to enable/disable features for users like ✨🌈💖
  • Benchmarks that measure queries with the modifier on and with it off

How did you test this code?

Wrote tests. In the future all modifiers should get their own tests under test_modifiers.py

@mariusandra mariusandra marked this pull request as ready for review October 12, 2023 12:16
@mariusandra mariusandra merged commit 61d224c into master Oct 13, 2023
72 checks passed
@mariusandra mariusandra deleted the hogql-modifiers branch October 13, 2023 10:47
daibhin pushed a commit that referenced this pull request Oct 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants