Mixed-type ordered comparisons fail closed.

highlighted = computed this step

Same-type ordered comparison

Ordered comparisons need exact same-type values in this model.

same type for order\text{same type for order}

Read string ordering

The same-type string comparison keeps 1 output row.

kept rows=1\text{kept rows}=1

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.

Same-type ordered comparison: base rowsidnameqtycity1alpha3Austin2beta7Boston3gamma7NULL4delta10Denver5epsilonNULLAustin Comparison result per rowsourceleftValueoprightValuetruthoutputRole0AustingtBostonFALSEdropped1BostongtBostonFALSEdropped2NULLgtBostonUNKNOWNdropped3DenvergtBostonTRUEkept4AustingtBostonFALSEdropped WHERE-style TRUE-only output rowsidnameqtycity4delta10Denver Comparison factsfactvalueinputRowCount5trueCount1falseCount3unknownCount1outputRowCount1droppedRowCount4orderedComparisonyeswhereKeepsTRUE_only_source_order

Mixed type fails closed

A qty compared to string '7' with an ordered operator is rejected instead of guessed.

mixed order rejected\text{mixed order rejected}

Summary

The model teaches the comparison rule without inventing type coercion.

no coercion claim\text{no coercion claim}