COALESCE does not reorder rows.

highlighted = computed this step

Source order and output order

This tiny model keeps rows in source order.

source order\text{source order}

Read output rows

The output has 4 rows in the same order as the input.

output rows=4\text{output 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.

Source order and output order: 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

No sorting step

COALESCE chooses values; it does not reorder rows.

no reorder\text{no reorder}

Summary

The output row order is the input row order.

same row order\text{same row order}