Skip to content

Conversation

@MazterQyou
Copy link
Member

This PR fixes an issue with column resolving picking up outer columns where it shouldn't. One example when this happened is when ORDER BY had an aggregate function over a column that was not aggregated over (e.g. SELECT c1 FROM t GROUP BY c1 ORDER BY SUM(c2)). In such cases the schema would lack c2 when resolving order clauses, leading to it picking up c2 from outer context instead of adding missing columns/aggregate expressions down the plan.

Related test is included but disabled because #203 is a requirement for this test to work; it will be re-enabled when #203 has been merged.

@MazterQyou MazterQyou force-pushed the cubesql/fix-subquery-outer-column-ref branch from 10875bb to e11ff0b Compare December 18, 2025 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants