Fix ORDER BY in complex situations (#902)
Make IteratorStmt bind with WITH instead of FOR when self_ref_must_bind. This gives us a distinct name for the binding but still relies on the Select or whatever to do the actual binding, which makes ORDER BY work properly. (Previously ORDER BY wouldn't work in these cases because it was inside a FOR.) Fixes #893.
M
Michael J. Sullivan committed
30ef7bfad2edffeca2b088c9956ff8fc0aa000d0
Parent: 0bd97df
Committed by GitHub <noreply@github.com>
on 9/4/2025, 9:24:38 PM