Commit 3874d91
committed
fix: preserve OVER clause during window function rewriting
Two fixes for window function execution:
1. Parser fix: Fixed "order by order by" duplication in WindowSpec.Format()
- The OrderBy.Format() method adds its own "order by" prefix
- WindowSpec.Format() was also adding "order by" before calling OrderBy
- Changed to iterate OrderBy items directly without the prefix
2. Execution layer fix: Preserve OVER clause during AST function rewriting
- Added node.Over = newNode.Over in 5 astvisit files:
- query_rewriting.go
- from_rewrite.go
- fragment_rewriting.go
- internally_routable_typing.go
- provider_string_extract.go
- Without this, window functions lost their OVER clause during rewriting1 parent 5fd98aa commit 3874d91
File tree
7 files changed
+756
-745
lines changed- internal
- stackql-parser-fork/go/vt/sqlparser
- stackql/astvisit
7 files changed
+756
-745
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1987 | 1987 | | |
1988 | 1988 | | |
1989 | 1989 | | |
1990 | | - | |
| 1990 | + | |
| 1991 | + | |
| 1992 | + | |
| 1993 | + | |
| 1994 | + | |
| 1995 | + | |
| 1996 | + | |
1991 | 1997 | | |
1992 | 1998 | | |
1993 | 1999 | | |
| |||
0 commit comments