The output has 4 rows in the same order as the input.
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.
No sorting step
COALESCE chooses values; it does not reorder rows.