You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix column alias loss during derived table flattening — When a view was flattened inside a GROUP BY query, column references like v.CompanyId were rewritten to their inner expression (e.g., Companies_1.Id), silently changing the inferred column name from CompanyId to Id. Outer queries referencing the original name (e.g., cl.CompanyId) would then fail with "Invalid column name". The fix snapshots inferred SELECT column names before rewriting and restores them as explicit AS aliases when the last identifier changes.