Expected CASE facts are assertions only.

highlighted = computed this step

Honest by construction

Expected CASE facts are assertions only.

compiler is source of truth\text{compiler is source of truth}

Render checked rows

The guarded CASE expression renders 4 output rows after recomputation.

checked rows=4\text{checked rows}=4

CASE-expression examples are tiny finite row transforms with SQL-style TRUE/FALSE/UNKNOWN logic; SQL dialect completeness, type coercion, optimizer behavior, indexing, and product claims are out of scope.

Honest by construction: base rowsnamescorestatusAda90activeBea40activeCalNULLactiveDee70paused CASE branch evaluationsourcevaluesevaluationsresultresultSource0[Ada, 90, active][{branch:0, truth:TRUE, chosen:yes}, {branch:1, truth:TRUE, chosen:no}]highbranch 01[Bea, 40, active][{branch:0, truth:FALSE, chosen:no}, {branch:1, truth:FALSE, chosen:no}]lowELSE2[Cal, NULL, active][{branch:0, truth:UNKNOWN, chosen:no}, {branch:1, truth:UNKNOWN, chosen:no}]lowELSE3[Dee, 70, paused][{branch:0, truth:FALSE, chosen:no}, {branch:1, truth:TRUE, chosen:yes}]midbranch 1 CASE output rowsnamescorestatusbucketAda90activehighBea40activelowCalNULLactivelowDee70pausedmid CASE factsfactvalueinputRowCount4branchCount2outputRowCount4firstTrueRows2elseRows2nullElseRows0unknownSkipped2rowOrdersource_order

Try to tamper

Wrong expected facts, derived sidecars, duplicate aliases, missing columns, bools, floats, and invalid comparisons fail closed.

tamper rejected\text{tamper rejected}

Summary

The book shows exact finite CASE behavior only; product SQL behavior is outside the model.

scoped CASE model\text{scoped CASE model}