[Django] #32722: Comparing to TruncTime() doesn't work on Oracle.

20 views
Skip to first unread message

Django

unread,
May 7, 2021, 2:07:08 AM5/7/21
to django-...@googlegroups.com
#32722: Comparing to TruncTime() doesn't work on Oracle.
-------------------------------------+-------------------------------------
Reporter: Mariusz | Owner: Mariusz Felisiak
Felisiak |
Type: Bug | Status: assigned
Component: Database | Version: 3.2
layer (models, ORM) |
Severity: Normal | Keywords: oracle ttrunctime
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
Comparing to `TruncTime()` doesn't work on Oracle because we don't change
the date part to `1900-01-01` (which is set for `TimeFields`), e.g.
{{{
.filter(start_datetime__time=start_datetime.time())
}}}
is translated to
{{{
"DB_FUNCTIONS_DTMODEL"."START_DATETIME" = 1900-01-01 14:30:26.000321
}}}
which cannot work because `start_datetime == datetime(2015, 6, 15, 14, 30,
26, 321)`.

Noticed when checking #32699.

--
Ticket URL: <https://code.djangoproject.com/ticket/32722>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
May 7, 2021, 3:01:08 AM5/7/21
to django-...@googlegroups.com
#32722: Comparing to TruncTime() doesn't work on Oracle.
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: Mariusz

| Felisiak
Type: Bug | Status: assigned
Component: Database layer | Version: 3.2
(models, ORM) |
Severity: Normal | Resolution:

Keywords: oracle ttrunctime | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* has_patch: 0 => 1


Comment:

[https://github.com/django/django/pull/14365 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/32722#comment:1>

Django

unread,
May 11, 2021, 3:13:34 AM5/11/21
to django-...@googlegroups.com
#32722: Comparing to TruncTime() doesn't work on Oracle.
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: Mariusz

| Felisiak
Type: Bug | Status: assigned
Component: Database layer | Version: 3.2
(models, ORM) |
Severity: Normal | Resolution:
Keywords: oracle ttrunctime | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):

* stage: Unreviewed => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/32722#comment:2>

Django

unread,
May 11, 2021, 3:19:40 AM5/11/21
to django-...@googlegroups.com
#32722: Comparing to TruncTime() doesn't work on Oracle.
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: Mariusz
| Felisiak
Type: Bug | Status: closed

Component: Database layer | Version: 3.2
(models, ORM) |
Severity: Normal | Resolution: fixed

Keywords: oracle ttrunctime | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson <carlton@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"b1a4b1f0bdf05adbd3dc4dde14228e68da54c1a3" b1a4b1f]:
{{{
#!CommitTicketReference repository=""
revision="b1a4b1f0bdf05adbd3dc4dde14228e68da54c1a3"
Fixed #32722 -- Fixed comparing to TruncTime() on Oracle.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/32722#comment:3>

Reply all
Reply to author
Forward
0 new messages