Expected COALESCE facts are assertions only.

highlighted = computed this step

Honest by construction

Expected COALESCE facts are assertions only.

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

Render checked rows

The guarded COALESCE expression renders 4 output rows after recomputation.

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

COALESCE examples are tiny finite row transforms with SQL-style NULL choice behavior; SQL dialect completeness, type coercion, optimizer behavior, indexing, and product claims are out of scope.

Honest by construction: base rowsnameemailbackupnicknameAdaada@exampleada@backupNULLBeaNULLbea@backupBCalNULLNULLCalDeeNULLNULLNULL COALESCE argument choicesourcearg valueschosenIndexresultresultSource0[ada@example, ada@backup, missing]0ada@exampleemail1[NULL, bea@backup, missing]1bea@backupbackup2[NULL, NULL, missing]2missingliteral3[NULL, NULL, missing]2missingliteral COALESCE output rowsnameemailbackupnicknamecontactAdaada@exampleada@backupNULLada@exampleBeaNULLbea@backupBbea@backupCalNULLNULLCalmissingDeeNULLNULLNULLmissing COALESCE factsfactvalueinputRowCount4argCount3outputRowCount4firstArgRows1fallbackRows3literalDefaultRows2allNullRows0rowOrdersource_orderwhereContrastvalue_choice_not_truth_filter

Try to tamper

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

tamper rejected\text{tamper rejected}

Summary

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

scoped COALESCE model\text{scoped COALESCE model}