Leaklens

django__django-13449

Lag() with DecimalField crashes on SQLite.

Verdict: the fix is stated in the issue (Tier A).

An alternative would be to make Window inherit from SQLiteNumericMixin and make its as_sqlite special case itself when isinstance(self.output_field, 'DecimalField') with something along def as_sqlite(self, compiler, connection): if isinstance(self.output_field, 'DecimalField'): copy = self.copy() source_expressions = copy.get_source_expressions() source_expressions[0].output_field = FloatField()

The text states the fix: “An alternative would be to make Window inherit from SQLiteNumericMixin and make its as_sqlite special case itself when isinstance(self.output_field, 'DecimalField') with…”

All SWE-bench Verified tasks · more django/django tasks · How the check works