Unexpected Query Results Due to Ambiguous Column Affinity in UNION-Based Views
Issue Overview: Inconsistent Filtering Behavior in Views with Mixed-Type UNION Columns A developer encountered unexpected results when querying a view created via a UNION operation between a table column and a CAST(NULL AS NUMERIC) expression. The view v0 returns two NULL rows in a basic SELECT, but when used in a complex WHERE clause involving…