Skip to content

Commit b7fa5a6

Browse files
committed
test(eql): run the element predicate over Stack Encrypt documents in PostgreSQL
Seals contact lists with the JSON index, derives `element_match` through a data plan over eql-bindings' target table, and queries the column: two contacts each holding half of the predicate are returned by the superset query (`@>` and an ordering over `json_tree_path_query`) and not by `json_tree_element_match`; one contact holding both is returned by both; a folded spelling ties under the element predicate and not under exact containment; a bound below the longest array raises; and `json_tree_subtree` equals the indexed read without `k` under every budget, the sealed-root fallback at `k = 0`. The rest of the SQL's contract is pinned over the same documents and operands: the operand domain's CHECK member by member, over a derived operand and its parts; one element must satisfy every member under the sealed root and the open one; each bound, `between` and `eq` compare as the entry operators do, and a field with no ordering term or no field satisfies none; a probe's hit raises, including a token whose node was moved to the element's selector; and `k` is the place of the token whose node a row sits in. EQL tests run over real encrypted data, and the SQLx suite has no way to produce a JSON tree document, so these live here. Refs #1440
1 parent 26294a8 commit b7fa5a6

2 files changed

Lines changed: 1042 additions & 0 deletions

File tree

‎packages/eql/tests/encryption/tests/json_tree.rs‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -516,6 +516,10 @@ mod generated;
516516
#[path = "json_tree/native_functions.rs"]
517517
mod native_functions;
518518

519+
/// The element-scoped predicate, through a data plan, against the column.
520+
#[path = "json_tree/elements.rs"]
521+
mod elements;
522+
519523
/// Needs an EQL v4 installation. Extraction by selector opens to the leaf;
520524
/// the subtree walk by a client-derived token returns exactly the nodes
521525
/// under it and reassembles; the array functions count and list elements;

0 commit comments

Comments
 (0)