Window.order_by decimal field is broken on SQLite
Initially reported on the Discord and demonstrated in this Django project.
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.
Change History
(8)
Triage Stage: |
Unreviewed → Accepted
|
Owner: |
changed from nobody to Simon Charette
|
Status: |
new → assigned
|
Triage Stage: |
Accepted → Ready for checkin
|
Resolution: |
→ fixed
|
Status: |
assigned → closed
|