We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 75441c5 commit 81416cbCopy full SHA for 81416cb
1 file changed
test/features/window.ts
@@ -5,12 +5,12 @@ import { FormatFn } from 'src/sqlFormatter';
5
export default function supportsWindow(format: FormatFn) {
6
it('formats WINDOW clause at top level', () => {
7
const result = format(
8
- 'SELECT *, LAG(value) OVER wnd AS next_value FROM tbl WINDOW wnd AS (PARTITION BY id ORDER BY time);'
+ 'SELECT *, ROW_NUMBER() OVER wnd AS next_value FROM tbl WINDOW wnd AS (PARTITION BY id ORDER BY time);'
9
);
10
expect(result).toBe(dedent`
11
SELECT
12
*,
13
- LAG(value) OVER wnd AS next_value
+ ROW_NUMBER() OVER wnd AS next_value
14
FROM
15
tbl
16
WINDOW
0 commit comments