Skip to content

Pin PostHog UDFs to the sorted, compact cleaner - #21

Merged
rorylshanks merged 1 commit into
mainfrom
udfs-sorted-compact-nested
Nov 14, 2026
Merged

rorylshanks merged 1 commit into
mainfrom
udfs-sorted-compact-nested

Conversation

@rorylshanks

Copy link
Copy Markdown
Collaborator

Changes

  • Pin clickhouse-util-udfs.yml to 7cbfd2508645378cc7d203654105624f377c8d05, the current head of feat(clickhouse): store objects and lists as text in events_json posthog#135224. Pin PostHog UDFs to PostHog/posthog#135224 #20 pinned 2b4f414.
  • Since 2b4f414, the 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. 2b4f414 stored the text as sent.
  • The HogQL in #135224 reads that layout, so the rewrite must use the same cleaner as the events cluster (PostHog/posthog-cloud-infra#12290).
  • Both UDF manifests are byte-identical between the two SHAs. Only the cleaner binaries differ, so the worker still installs the same 60 UDFs.
  • e2e/sql/udfs.sql gains one assertion, {"$set":{ "b":"x/y", "a":2.0 }} → {"$set":"{\"a\":2.0,\"b\":\"x/y\"}"}, which fails on the 2b4f414 cleaner.

Warning

PostHog/posthog#135224 is still open. If a new commit there changes the cleaner, this pin has to move again before the events_json backfill uploads.

Verification

  • clickhouse format parses e2e/sql/udfs.sql.
  • The expected string matches TestProcessEnvelopeLineStoresObjectsAndArraysAsStrings at 7cbfd25: keys sorted, 2.0 kept, / not escaped.
  • Not run locally: go test ./... and ./e2e/run.sh. The cleaner binaries are Linux-only, and this change touches no Go code.

🤖 Generated with Claude Code

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 <noreply@anthropic.com>
@rorylshanks
rorylshanks merged commit f265737 into main Nov 14, 2026
11 checks passed
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.

1 participant