Commit 9310974
committed
Call processIndirect for CTE references to get proper column context
The root cause of the "no such column: name" error was that CTEs were
not calling processIndirect(), unlike subqueries. This meant the CTE's
selCtx was never set, and column lookups would fail.
processIndirect runs the CTE's inner SELECT through the primitive
generation pipeline, which sets up the proper column metadata with
both API names and user aliases - enabling column name resolution.1 parent ddc4a54 commit 9310974
1 file changed
+7
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
842 | 842 | | |
843 | 843 | | |
844 | 844 | | |
845 | | - | |
846 | | - | |
847 | | - | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
848 | 848 | | |
849 | 849 | | |
850 | 850 | | |
851 | 851 | | |
852 | | - | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
853 | 856 | | |
854 | 857 | | |
855 | 858 | | |
| |||
0 commit comments