You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
json_tree is missing from the EQL catalog, so no Go types are generated for it #1348
json_tree is the EQL v4 type family for an encrypted JSON document. EQL (Encrypt Query Language) is the SQL library installed into a customer's PostgreSQL database; Stack Encrypt is the Rust engine that encrypts the values EQL stores. The Rust engine and the SQL for json_tree are built in #1288, #1325, #1329 and #1336.
Every EQL type is listed in one catalog. eql-codegen reads that catalog to generate the Rust target table and the Go types in languages/golang/encrypt/eql/eql_gen.go. A Go program stores and queries EQL columns through those generated types.
Problem
The json_tree types were hand-written in packages/eql/crates/eql-bindings/src/v4/json_tree.rs and never added to the catalog. That file says so itself: the family is "not in the catalog yet, so it is not in super::all nor in the target table".
So:
the Go SDK has no eql.JSONTree type to scan a column into;
the engine's guest cannot look the type up by name;
stashgen cannot see that a json_tree field must use null=sql. A null document cannot be padded to a value's length, because documents have no single length.
Proposal
Add the json_tree family to the catalog, v4::all() and the target table: the stored type, the query type, the leaf query type and the entry type.
Run mise run types:generate, so eql_gen.go gains JSONTree, JSONTreeQuery, JSONTreeLeafQuery and JSONTreeEntry. Each is marked not producible, with a reason that points at the data-plan issue.
Decide whether the selector, which is a text value, needs a generated or a hand-written Go type.
Report the family as not fixed-width, so stashgen requires null=sql.
Gates: types:check, go_eql_parity and the eql-codegen tests.
Activity