Re: [Django] #24699: Add Avg('DurationField') support on Oracle

2015-05-30 Thread Django
#24699: Add Avg('DurationField') support on Oracle
-+-
 Reporter:  timgraham|Owner:  jarshwah
 Type:  New feature  |   Status:  closed
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  oracle   | 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 Tim Graham ):

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


Comment:

 In [changeset:"c7805ee214802ff1c0de53660bd2594bc1abfebb" c7805ee]:
 {{{
 #!CommitTicketReference repository=""
 revision="c7805ee214802ff1c0de53660bd2594bc1abfebb"
 Fixed #24699 -- Added aggregate support for DurationField on Oracle
 }}}

--
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.6bf5524e284831fcf14f1309b37e6a53%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24699: Add Avg('DurationField') support on Oracle

2015-05-27 Thread Django
#24699: Add Avg('DurationField') support on Oracle
-+-
 Reporter:  timgraham|Owner:  jarshwah
 Type:  New feature  |   Status:  new
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  oracle   | 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 jarshwah):

 * needs_better_patch:  1 => 0
 * stage:  Accepted => Ready for checkin


--
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.e88da62c4f680083b6c86f43fecabccc%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24699: Add Avg('DurationField') support on Oracle

2015-05-25 Thread Django
#24699: Add Avg('DurationField') support on Oracle
-+-
 Reporter:  timgraham|Owner:  jarshwah
 Type:  New feature  |   Status:  new
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  oracle   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by timgraham):

 * needs_better_patch:  0 => 1


--
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.f62e85fd459f5a727b2cacdb2333da5c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24699: Add Avg('DurationField') support on Oracle

2015-05-23 Thread Django
#24699: Add Avg('DurationField') support on Oracle
-+-
 Reporter:  timgraham|Owner:  jarshwah
 Type:  New feature  |   Status:  new
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  oracle   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by jarshwah):

 * has_patch:  0 => 1
 * version:  1.8 => master


Comment:

 PR: https://github.com/django/django/pull/4699

--
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.9c83cbdb5b16be5c66e484b0eb542d69%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24699: Add Avg('DurationField') support on Oracle

2015-05-22 Thread Django
#24699: Add Avg('DurationField') support on Oracle
-+-
 Reporter:  timgraham|Owner:  jarshwah
 Type:  New feature  |   Status:  new
Component:  Database layer   |  Version:  1.8
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  oracle   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by jarshwah):

 I'm working on this at the moment. I think there are similar issues with
 the SUM(interval) aggregate, so I'll do that if required too.

--
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.c7a2c57194f607ac521f918b4bea9de1%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #24699: Add Avg('DurationField') support on Oracle

2015-04-24 Thread Django
#24699: Add Avg('DurationField') support on Oracle
-+-
   Reporter:  timgraham  |  Owner:  jarshwah
   Type:  New| Status:  new
  feature|
  Component:  Database   |Version:  1.8
  layer (models, ORM)|
   Severity:  Normal |   Keywords:  oracle
   Triage Stage:  Accepted   |  Has patch:  0
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 From Josh in a [https://github.com/django/django/pull/4548 PR]:

 Oracle doesn't allow `Avg` or `Sum` on interval data types. Seems like the
 commonly accepted way to do so is with `EXTRACT(day from
 24*60*60*interval)`. See http://stackoverflow.com/a/5063553/10583. That
 only gets you to second resolution though, completely ignoring
 microseconds. Not really ideal.

 http://www.dba-oracle.com/t_timestamp_math_elapsed_times.htm is another
 option which involves extracting each piece of the date component and
 multiplying by a constant. That'll give microsecond precision (decimal
 second component at least).
 {{{
 with the_interval as (
   select INTERVAL '4 5:12:10.99' DAY TO SECOND(6) itv from dual
 )
 select
   itv,
  -- convert back to interval after applying avg function
  NUMTODSINTERVAL(avg(extract(day from itv)*86400 +
   extract(hour from itv)*3600 +
   extract(minute from itv)*60 +
   extract(second from itv)), 'SECOND') seconds_with_precision,
   extract(day from 24*60*60*itv) seconds_without_precision
 from the_interval;
 }}}

 To support this in `AVG`, we'd need to create an `as_oracle()` method,
 test if the `output_field` is an interval, and then wrap `output_field`
 with multiple extracts. The `functions.Coalesce` does something similar
 with `TextField`s, so it's not unprecedented.

--
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/052.75836f7967157dcff891070b27bb35dc%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.