Repository navigation
Commit c6da7e2
committed
test(eql): run compiled predicates over Stack Encrypt documents in PostgreSQL
Documents sealed by Stack Encrypt's JSON index, predicates compiled by
`match` through a data plan over eql-bindings' target table, and
`eql_v4.json_tree_match` and `@@` over the column against PostgreSQL's
`jsonb_path_match` over the plaintexts: the same rows, and the same
answer row by row save NULL where jsonpath says false of an ordering
over a null that sends no `null` needle. And against the WHERE written
from the operands each leaf's own operator derives, NULL included.
The rest of the SQL's contract is pinned over the same documents and
derived operands: the domain's CHECK node kind by node kind, over a
compiled tree and its parts; for every predicate, the WHERE written
from the compiled tree's own leaves; three-valued logic under `and`,
`or` and `not`, and an ordering leaf alone; a `contains` leaf as `@>`,
the root scalar's `alt` included; an `elements` leaf as the element
match, a leaf the answer does not depend on left unread; and `@@` with
a typed predicate, a blocked jsonpath, an untyped operand and NULLs.
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 #1441
Claude-Session: https://claude.ai/code/session_01MrxG724qYKcAWJdcABBFNY1 parent 8366e0a commit c6da7e2
3 files changed
Lines changed: 1029 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
520 | 520 | | |
521 | 521 | | |
522 | 522 | | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
523 | 528 | | |
524 | 529 | | |
525 | 530 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
5 | 10 | | |
6 | 11 | | |
7 | 12 | | |
| |||
26 | 31 | | |
27 | 32 | | |
28 | 33 | | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
33 | 39 | | |
34 | 40 | | |
35 | 41 | | |
| |||
50 | 56 | | |
51 | 57 | | |
52 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
53 | 62 | | |
54 | 63 | | |
55 | 64 | | |
| |||
116 | 125 | | |
117 | 126 | | |
118 | 127 | | |
119 | | - | |
| 128 | + | |
120 | 129 | | |
121 | 130 | | |
122 | 131 | | |
123 | 132 | | |
124 | 133 | | |
125 | | - | |
| 134 | + | |
126 | 135 | | |
127 | 136 | | |
128 | 137 | | |
| |||
145 | 154 | | |
146 | 155 | | |
147 | 156 | | |
148 | | - | |
| 157 | + | |
149 | 158 | | |
150 | 159 | | |
151 | 160 | | |
| |||
0 commit comments