#35064: Window.order_by decimal field is broken on SQLite
-------------------------------------+-------------------------------------
Reporter: Simon | Owner: nobody
Charette |
Type: Bug | Status: new
Component: Database | Version: 3.2
layer (models, ORM) |
Severity: Normal | Keywords:
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
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.
--
Ticket URL: <https://code.djangoproject.com/ticket/35064>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/0107018cac9ca853-a8b1913f-62a1-4166-9d79-9599ae40caef-000000%40eu-central-1.amazonses.com.