From 830450ddc44e0a620c933fb210657eac251ce4a5 Mon Sep 17 00:00:00 2001 From: Rory Shanks Date: Sat, 14 Nov 2026 11:22:30 +0100 Subject: [PATCH] Pin PostHog UDFs to the sorted, compact cleaner Move the pin to 7cbfd25, the head of PostHog/posthog#135224. Its event, person and temporary cleaners write each top-level object and array as compact JSON text with the keys of every object in byte order. Numbers, nulls and duplicate keys inside the value are kept as sent. The UDF manifests are unchanged from 2b4f414; only the cleaner binaries differ. Add an e2e assertion that fails on the 2b4f414 cleaner, which stored the text as sent. Co-Authored-By: Claude Opus 5.5 --- clickhouse-util-udfs.yml | 2 +- e2e/sql/udfs.sql | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/clickhouse-util-udfs.yml b/clickhouse-util-udfs.yml index 88072a8..1d0feef 100644 --- a/clickhouse-util-udfs.yml +++ b/clickhouse-util-udfs.yml @@ -1,5 +1,5 @@ repository: PostHog/posthog -revision: 2b4f41441705e283bc413090ce045bdee9ef39ec +revision: 7cbfd2508645378cc7d203654105624f377c8d05 manifest_paths: - docker/clickhouse/user_defined_function.xml - posthog/user_scripts/latest_user_defined_function.xml diff --git a/e2e/sql/udfs.sql b/e2e/sql/udfs.sql index 51ea74a..4afb4f5 100644 --- a/e2e/sql/udfs.sql +++ b/e2e/sql/udfs.sql @@ -1,4 +1,4 @@ --- PostHog 2b4f41441705e283bc413090ce045bdee9ef39ec (PostHog/posthog#135224): all 60 executable UDFs. +-- PostHog 7cbfd2508645378cc7d203654105624f377c8d05 (PostHog/posthog#135224): all 60 executable UDFs. -- Empty funnels return no conversions; debug functions echo valid JSON. WITH toUInt8(2) AS steps, @@ -36,6 +36,7 @@ SELECT throwIf(JSONCleanPostHogEventProperties('{"a":1,"b":null}') != '{"a":1}', 'JSONCleanPostHogEventProperties failed'), throwIf(JSONCleanPostHogPersonProperties('{"a":1,"b":null}') != '{"a":1}', 'JSONCleanPostHogPersonProperties failed'), throwIf(JSONCleanPostHogTemporaryProperties('{"$set":{"a":1},"b":2}') != '{"$set":"{\\"a\\":1}"}', 'JSONCleanPostHogTemporaryProperties failed'), + throwIf(JSONCleanPostHogTemporaryProperties('{"$set":{ "b":"x/y", "a":2.0 }}') != '{"$set":"{\\"a\\":2.0,\\"b\\":\\"x/y\\"}"}', 'JSONCleanPostHogTemporaryProperties sorted compact failed'), throwIf(JSONStripEmptyStringsAndNulls('{"a":1,"b":null,"c":""}') != '{"a":1}', 'JSONStripEmptyStringsAndNulls failed'), throwIf(decompress(unhex('170000006068656c6c6f200600d06f2068656c6c6f2068656c6c6f'), 'LZ4SizePrefixed') != 'hello hello hello hello', 'decompress failed'), throwIf(JSONDropKeysPool('{"a":1,"b":2}', ['a']) != '{"b":2}', 'JSONDropKeysPool failed'),