Expected BETWEEN facts are assertions only.
Honest by construction
Expected BETWEEN facts are assertions only.
compiler is source of truth \text{compiler is source of truth} compiler is source of truth
Render checked rows
The guarded BETWEEN range renders 3 TRUE output rows after recomputation.
checked rows = 3 \text{checked rows}=3 checked rows = 3
BETWEEN examples are tiny finite-table transforms with SQL-style TRUE/FALSE/UNKNOWN results; SQL dialect completeness, type coercion, optimizer behavior, indexing, and product claims are out of scope.
Honest by construction: base rows id name qty 1 small 3 2 edge-low 5 3 middle 7 4 edge-high 9 5 large 12 6 missing NULL
BETWEEN result per row source testedValue lower upper rangePosition baseTruth truth outputRole 0 3 5 9 below FALSE FALSE dropped 1 5 5 9 inside TRUE TRUE kept 2 7 5 9 inside TRUE TRUE kept 3 9 5 9 inside TRUE TRUE kept 4 12 5 9 above FALSE FALSE dropped 5 NULL 5 9 unknown UNKNOWN UNKNOWN dropped
WHERE-style TRUE-only output rows id name qty 2 edge-low 5 3 middle 7 4 edge-high 9
BETWEEN facts fact value inputRowCount 6 trueCount 3 falseCount 2 unknownCount 1 outputRowCount 3 droppedRowCount 3 belowCount 1 insideCount 3 aboveCount 1 equalEndpointRange no negated no whereKeeps TRUE_only_source_order
Try to tamper
Wrong expected facts, derived sidecars, missing columns, malformed ranges, bools, floats, and mixed-type ordered values fail closed.
tamper rejected \text{tamper rejected} tamper rejected
Summary
The book shows exact finite BETWEEN behavior only; product SQL behavior is outside the model.
scoped BETWEEN model \text{scoped BETWEEN model} scoped BETWEEN model