To add autocomplete/intellisense support to writing HogQL queries in PostHog. Allowing users to be able to identify and select fields, properties, and general SQL keywords
Step 1: Make it work
[x] Fields on tables
[x] Lazy join fields
[x] Recursive fields
[x] Field traversers
[x] Table aliases
[x] Properties (StringJSONDatabaseField type)
[x] Property types (string/int/etc)
[x] Table names
[x] Common table expressions
[x] Returning a subset of fields from a table
[x] Constant types (returning a "string" and not a db column)
Step 2: Make it good
[ ] Support ast.SelectUnionQuery
[ ] Support field aliases in where/order by/group by clauses
HogQL Autocomplete TODOs
What's the goal of this?
To add autocomplete/intellisense support to writing HogQL queries in PostHog. Allowing users to be able to identify and select fields, properties, and general SQL keywords
Step 1: Make it work
StringJSONDatabaseField
type)Step 2: Make it good
ast.SelectUnionQuery
properties.$browser
in awhere
clauseto<Type>
function when there's a type mismatch in comparisonsStep 3: Make it complete
Others