Commit a7236a4
committed
docs(spec,formula,driver-memory): record the ruled EXCLUDE direction for negative operators over no-value rows (#5299)
The 2026-08-10 maintainer ruling on #5299 takes SQL's native three-valued
logic as the common denominator: negative operators never match no-value
rows; the only ways to select "no value" are `$exists: false` /
`$null: true`.
No behaviour moves here, and the diff explains why rather than leaving the
next reader to re-derive it. The ruled direction REVERSES what #5298
shipped and #5146 ruled before it — which is what the four enrolled
`d`-column conformance cases enforce today, and what every SQL compiler in
the repo was deliberately bent to (`nullSafeNegative`, plus four
independent copies of `nullValueSatisfiesOperator` answering `$nin` -> true
and `$notContains` -> true). Flipping `formula` alone would re-open the
write-side/read-side split PR #5962 closed, with the sign reversed.
Measured on 60f0dd8 by adding the candidate rows to `FILTER_LOGIC_CASES`
and running every suite that drives it. Eleven surfaces answer the include
direction on `$notContains` and `$nin`; `$exists` is already ruled-correct
on both JS evaluators (#5962) and still key-presence on `driver-memory`'s
live mingo path and on `driver-mongodb`. The table is in the new family 4
note in the conformance header.
Two measured blockers to enrolment, both recorded there:
- the DEBT ledger in `scripts/check-driver-conformance.mjs` is per
(driver x case-set), not per case, so there is no legal spelling for
"this driver fails one row" — a row added ahead of a backend is simply a
red gate;
- two of the five scored drivers are inside the #5499 investment freeze,
and both answer the include direction on their live query paths.
Pins re-annotated rather than flipped, and made load-bearing: the
formula-side file now asserts the non-negated `$notContains` / `$nin` row
sets explicitly, so the cross-backend PR has to move them deliberately.
`driver-memory`'s behaviour is untouched per #5499 and per the ruling's own
"the early-exit guard stays as-is"; one stale claim in its pin is
corrected — it said `formula` reads `$exists` as key-presence, which
stopped being true in PR #5962.
Refs #5299 #5298 #5962 #5499 #5240 #5146
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UmjKBzRFKnUgkk74DVUqYd1 parent 60f0dd8 commit a7236a4
5 files changed
Lines changed: 257 additions & 19 deletions
File tree
- .changeset
- packages
- drivers/driver-memory/src
- formula/src
- spec/src/data
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
Lines changed: 16 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
205 | 220 | | |
206 | | - | |
| 221 | + | |
207 | 222 | | |
208 | 223 | | |
209 | 224 | | |
| |||
Lines changed: 50 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
132 | | - | |
133 | | - | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
134 | 167 | | |
135 | 168 | | |
136 | 169 | | |
137 | | - | |
138 | | - | |
| 170 | + | |
| 171 | + | |
139 | 172 | | |
140 | 173 | | |
141 | 174 | | |
142 | 175 | | |
143 | | - | |
144 | | - | |
145 | | - | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
146 | 181 | | |
147 | 182 | | |
148 | 183 | | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
153 | 189 | | |
154 | 190 | | |
| 191 | + | |
| 192 | + | |
155 | 193 | | |
156 | 194 | | |
157 | 195 | | |
Lines changed: 61 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
120 | | - | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
121 | 125 | | |
122 | 126 | | |
123 | 127 | | |
| |||
182 | 186 | | |
183 | 187 | | |
184 | 188 | | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
185 | 244 | | |
0 commit comments