Commit 3abf36e
committed
fix: handle BinaryExpr and propagate aggregate status in complex expressions
- Add BinaryExpr case in inferColNameFromExpr to handle arithmetic
expressions like "100.0 * contributions / SUM(...)"
- BinaryExpr checks if either operand is an aggregate/window expression
and propagates IsAggregateExpr status
- Multi-argument functions now propagate IsAggregateExpr from their
arguments, so ROUND(expr_with_window_func, 2) is correctly marked
This fixes "cannot find col" errors when using complex expressions
containing window functions in CTE queries.1 parent 2a03b97 commit 3abf36e
1 file changed
+21
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
678 | 678 | | |
679 | 679 | | |
680 | 680 | | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
681 | 685 | | |
682 | 686 | | |
683 | 687 | | |
| |||
799 | 803 | | |
800 | 804 | | |
801 | 805 | | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
802 | 823 | | |
803 | 824 | | |
804 | 825 | | |
| |||
0 commit comments