﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
35064	Window.order_by decimal field is broken on SQLite	Simon Charette	Simon Charette	"Initially reported [https://discord.com/channels/856567261900832808/1180704302847766538/1180704302847766538 on the Discord] and demonstrated in [https://github.com/Quoates/django_rank_order_by this Django project].

{{{#!python
class RankTest(models.Model):
    name = models.CharField(max_length=30)
    category = models.CharField(max_length=30)
    rating = models.DecimalField(max_digits=8, decimal_places=5)

list(
    RankTest.objects.annotate(
        rank=Window(
            expression=Rank(),
            order_by='rating'
        )
    )
)
}}}

The solution implemented in #31723 (71d10ca8c90ccc1fd0ccd6683716dd3c3116ae6a) wish addressed the improper of casting for `Window.expression` caused some problematic one for `order_by` and likely `partition_by` as well."	Bug	closed	Database layer (models, ORM)	3.2	Normal	fixed			Ready for checkin	1	0	0	0	0	0
