A scalar subquery fails closed when row count is wrong.
highlighted = computed this step
Scalar rejects zero or many
A scalar subquery must not return more than one row in this finite model.
scalar row count is guarded
Reject many rows
The many-row case is rejected, and result rows are 0.
many result rows=0
Subquery examples are tiny finite table evaluations; SQL dialects, optimizer rewrites, NULL truth tables beyond the explicit NOT IN caveat, performance, and product behavior are out of scope.
Reject zero rows
The zero-row case is rejected, and result rows are 0.
zero result rows=0
Subquery examples are tiny finite table evaluations; SQL dialects, optimizer rewrites, NULL truth tables beyond the explicit NOT IN caveat, performance, and product behavior are out of scope.
Read the reason
Both rejection reasons are scalar_row_count.
wrong row count
Summary
The model fails closed instead of choosing an arbitrary value.