Skip to content

Commit

Permalink
Add test for ignore_nulls=False
Browse files Browse the repository at this point in the history
  • Loading branch information
laserkaplan committed Dec 21, 2023
1 parent b292015 commit f6ec9ef
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/unit/sqlalchemy/test_compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,3 +140,14 @@ def test_ignore_nulls(dialect, function, element):
assert str(query) == \
f'SELECT {function}("table".id) IGNORE NULLS OVER (PARTITION BY "table".name) AS window '\
f'\nFROM "table"'

statement = select(
element(
table_without_catalog.c.id,
ignore_nulls=False,
).over(partition_by=table_without_catalog.c.name).label('window')
)
query = statement.compile(dialect=dialect)
assert str(query) == \
f'SELECT {function}("table".id) OVER (PARTITION BY "table".name) AS window ' \
f'\nFROM "table"'

0 comments on commit f6ec9ef

Please sign in to comment.