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

fix(web-analytics): Use None, not Constant(value=None) #26509

Merged
merged 2 commits into from
Dec 2, 2024

Conversation

robbie-c
Copy link
Member

@robbie-c robbie-c commented Nov 28, 2024

Problem

If there was another bug, this pattern could lead to us adding NULLs to our queries, rather than throwing an error while constructing a query. The former could silently result in long-running queries which would have a negative impact on the entire clickhouse cluster, whereas the latter would only affect this query and be easily caught in tests.

This other bug happened, see https://posthog.slack.com/archives/C076R4753Q8/p1732724606064399, and was fixed, but let's get rid of this pattern regardless

Changes

Change this web analytics query to use a python None to show the absence of a conversion goal expression, rather than a hogql NULL

Does this work well for both Cloud and self-hosted?

Yes

How did you test this code?

Existing tests pass

@robbie-c robbie-c changed the title Set none not constant null fix(web-analytics): Use None, not Constant(value=None) Nov 28, 2024
@robbie-c robbie-c force-pushed the fix/set-none-not-constant-null branch 2 times, most recently from 6111bf0 to 0a55444 Compare November 28, 2024 16:46
@robbie-c robbie-c force-pushed the fix/set-none-not-constant-null branch from 16d558f to 456a163 Compare December 2, 2024 09:58
@robbie-c robbie-c marked this pull request as ready for review December 2, 2024 10:02
@robbie-c robbie-c enabled auto-merge (squash) December 2, 2024 12:34
@robbie-c robbie-c merged commit 7b7e8ff into master Dec 2, 2024
95 checks passed
@robbie-c robbie-c deleted the fix/set-none-not-constant-null branch December 2, 2024 12:48
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