Skip to content

Commit 5a630ba

Browse files
authored
allow partial support for filtering against window functions (#239)
1 parent e196f5a commit 5a630ba

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

mssql/compiler.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,9 @@ def as_sql(self, with_limits=True, with_col_aliases=False):
230230
if not getattr(features, 'supports_select_{}'.format(combinator)):
231231
raise NotSupportedError('{} is not supported on this database backend.'.format(combinator))
232232
result, params = self.get_combinator_sql(combinator, self.query.combinator_all)
233+
elif django.VERSION >= (4, 2) and self.qualify:
234+
result, params = self.get_qualify_sql()
235+
order_by = None
233236
else:
234237
distinct_fields, distinct_params = self.get_distinct()
235238
# This must come after 'select', 'ordering', and 'distinct' -- see

0 commit comments

Comments
 (0)