PostHog / posthog

🦔 PostHog provides open-source product analytics, session recording, feature flagging and A/B testing that you can self-host.
https://posthog.com
Other
19.45k stars 1.14k forks source link

fix: convert all bools to ints in the clickhouse printer #23455

Closed aspicer closed 4 days ago

aspicer commented 4 days ago

Clickhouse doesn't really support booleans very well. The experimental analyzer is more particular about it (this might be fixed in newer versions, but we're not on those now).

Convert all bools to 1 or 0 when printing to clickhouse https://github.com/PostHog/posthog/pull/23455/files#diff-ba6f073c621753e1e88d8f7db787de62a554fa1e4c940aca7b63afcbb94f3a45

Type bool is internally stored as UInt8. Possible values are true (1), false (0).

Fixes #23452

posthog-bot commented 4 days ago

Hey @aspicer! 👋 This pull request seems to contain no description. Please add useful context, rationale, and/or any other information that will help make sense of this change now and in the distant Mars-based future.