Expected comparison facts are assertions only.
Honest by construction
Expected comparison 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 comparison renders 2 TRUE output rows after recomputation.
checked rows = 2 \text{checked rows}=2 checked rows = 2
Comparison 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 city 1 alpha 3 Austin 2 beta 7 Boston 3 gamma 7 NULL 4 delta 10 Denver 5 epsilon NULL Austin
Comparison result per row source leftValue op rightValue truth outputRole 0 3 eq 7 FALSE dropped 1 7 eq 7 TRUE kept 2 7 eq 7 TRUE kept 3 10 eq 7 FALSE dropped 4 NULL eq 7 UNKNOWN dropped
WHERE-style TRUE-only output rows id name qty city 2 beta 7 Boston 3 gamma 7 NULL
Comparison facts fact value inputRowCount 5 trueCount 2 falseCount 2 unknownCount 1 outputRowCount 2 droppedRowCount 3 orderedComparison no whereKeeps TRUE_only_source_order
Try to tamper
Wrong expected facts, derived sidecars, missing columns, unsupported ops, bools, floats, and mixed ordered comparisons fail closed.
tamper rejected \text{tamper rejected} tamper rejected
Summary
The book shows exact finite comparison predicates only; product SQL behavior is outside the model.
scoped comparison model \text{scoped comparison model} scoped comparison model