WHERE-style output keeps TRUE rows in source order.

highlighted = computed this step

TRUE-only output order

This WHERE-style filter keeps TRUE rows only.

TRUE rows only\text{TRUE rows only}

Read output rows

The output has 3 rows, while 1 UNKNOWN row is dropped.

output rows=3\text{output rows}=3

Boolean-filter examples are tiny finite WHERE-style filters with SQL-style TRUE/FALSE/UNKNOWN logic; SQL dialect completeness, type coercion, optimizer behavior, indexing, and product claims are out of scope.

TRUE-only output order: base rowsidagestatus130active217active3NULLactive440paused525NULL Boolean predicate evaluationsourcevaluestruthkepttrace0[1, 30, active]TRUEyes[age ge 18 -> TRUE, status eq paused -> FALSE, OR(TRUE,FALSE) -> TRUE]1[2, 17, active]FALSEno[age ge 18 -> FALSE, status eq paused -> FALSE, OR(FALSE,FALSE) -> FALSE]2[3, NULL, active]UNKNOWNno[age ge 18 -> UNKNOWN, status eq paused -> FALSE, OR(UNKNOWN,FALSE) -> UNKNOWN]3[4, 40, paused]TRUEyes[age ge 18 -> TRUE, status eq paused -> TRUE, OR(TRUE,TRUE) -> TRUE]4[5, 25, NULL]TRUEyes[age ge 18 -> TRUE, status eq paused -> UNKNOWN, OR(TRUE,UNKNOWN) -> TRUE] Boolean filter output rowsidagestatus130active440paused525NULL Boolean filter factsfactvalueinputRowCount5outputRowCount3trueRows3falseRows1unknownRows1rootKindortreeOR(age ge 18, status eq paused)rowOrdersource_order

Source order remains

Kept rows stay in the same order as the source table.

source order kept\text{source order kept}

Summary

Boolean filtering keeps TRUE rows and does not sort them.

TRUE only source order\text{TRUE only source order}