Commit 2a03b97
committed
fix: mark window functions as aggregate expressions for CTE compatibility
Window functions (those with OVER clause) are computed expressions that
should not be looked up in underlying tables or CTEs. By setting
IsAggregateExpr = true for window functions, we allow them to bypass
column resolution in indirect queries (CTEs, subqueries, views).
This fixes "cannot find col" errors when using window functions like
RANK(), ROW_NUMBER(), SUM() OVER, etc. in queries that reference CTEs.1 parent a6bcfc3 commit 2a03b97
1 file changed
+5
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
638 | 638 | | |
639 | 639 | | |
640 | 640 | | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
641 | 646 | | |
642 | 647 | | |
643 | 648 | | |
| |||
0 commit comments