UNKNOWN rows are dropped and matching rows keep source order.

highlighted = computed this step

NULL input is dropped here

In this WHERE-style filter, NULL input gives UNKNOWN, and UNKNOWN is not kept.

UNKNOWN not kept\text{UNKNOWN not kept}

Read UNKNOWN and output rows

The compiler records 1 UNKNOWN row and 2 output rows in source order.

UNKNOWN rows=1\text{UNKNOWN rows}=1

LIKE-pattern examples are tiny finite WHERE-style filters with a small SQL-like pattern subset; collations, escapes, dialect behavior, indexes, optimizer behavior, and product claims are out of scope.

NULL input is dropped here: base rowsidname1Ada2Al3Alan4Bea5Jo6NULL LIKE evaluationsourcevaluepatterntruthkept0Ada%aTRUEyes1Al%aFALSEno2Alan%aFALSEno3Bea%aTRUEyes4Jo%aFALSEno5NULL%aUNKNOWNno LIKE output rowsidname1Ada4Bea LIKE factsfactvalueinputRowCount6outputRowCount2trueRows2falseRows3unknownRows1patternKindpercentrowOrdersource_order

Order is unchanged

Rows that match stay in the same order they had in the source table.

source order kept\text{source order kept}

Summary

LIKE filtering keeps TRUE rows, drops FALSE and UNKNOWN rows, and does not sort.

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