Skip to content

Commit 81416cb

Browse files
committed
Use ROW_NUMBER() in WINDOW clause test
This one is part of standard, unlike LAG()
1 parent 75441c5 commit 81416cb

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

test/features/window.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ import { FormatFn } from 'src/sqlFormatter';
55
export default function supportsWindow(format: FormatFn) {
66
it('formats WINDOW clause at top level', () => {
77
const result = format(
8-
'SELECT *, LAG(value) OVER wnd AS next_value FROM tbl WINDOW wnd AS (PARTITION BY id ORDER BY time);'
8+
'SELECT *, ROW_NUMBER() OVER wnd AS next_value FROM tbl WINDOW wnd AS (PARTITION BY id ORDER BY time);'
99
);
1010
expect(result).toBe(dedent`
1111
SELECT
1212
*,
13-
LAG(value) OVER wnd AS next_value
13+
ROW_NUMBER() OVER wnd AS next_value
1414
FROM
1515
tbl
1616
WINDOW

0 commit comments

Comments
 (0)