Skip to content

feat(hogql): add native compiler frontend - #11

Draft
bill-ph wants to merge 137 commits into
masterfrom
codex/native-hogql-m0
Draft

feat(hogql): add native compiler frontend#11
bill-ph wants to merge 137 commits into
masterfrom
codex/native-hogql-m0

Conversation

@bill-ph

@bill-ph bill-ph commented Aug 28, 2026

Copy link
Copy Markdown

Description

Managed-warehouse clients can submit HogQL directly to Trino without Python-side SQL rendering.

  • The statement protocol accepts typed, versioned HogQL requests and returns normal Trino query results or diagnostics.
  • The native parser and compiler lower HogQL syntax, functions, properties, joins, modifiers, parameters, and semantic relations into stock Trino AST nodes.
  • The coordinator consumes authenticated, pinned semantic catalogs from Duckgres and rejects stale or incompatible generations.
  • Bounded caches, refreshes, queues, payloads, diagnostics, and metrics keep compilation isolated from normal SQL execution.
  • DuckLake compatibility functions preserve supported ClickHouse semantics where stock Trino has no equivalent.
  • Parser, compiler, planner, endpoint, benchmark, and exact-image tests cover the native request path.

Warning

Merge and deploy Duckgres #1134 before this branch. The native frontend depends on that endpoint.

Additional context and related issues

  • The implementation keeps authorization and tenant guards in Duckgres and Trino rather than the language compiler.
  • Full Maven reactor and exact-image compatibility validation ran locally.
  • Codex implemented the change from an engineer-approved milestone plan.
  • The writing-pr-descriptions skill shaped this description.

Release notes

( ) This is not user-visible or is docs only, and no release notes are required.
(x) Release notes are required. Please propose a release note for me.
( ) Release notes are required, with the following suggested text:

## General
* Add native HogQL compilation to the PostHog Trino fork.

bill-ph added 30 commits August 26, 2026 21:33
@github-actions github-actions Bot added the docs label Aug 28, 2026
@bill-ph
bill-ph marked this pull request as draft August 28, 2026 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant