Opened 5 years ago

Closed 5 years ago

#30056 closed New feature (fixed)

Add SQLite support for StdDev() and Variance()

Reported by: Nick Pope Owned by: Nick Pope
Component: Database layer (models, ORM) Version: dev
Severity: Normal Keywords: sqlite, stddev, variance, statistics
Cc: Mariusz Felisiak Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

StdDev() and Variance() are currently supported for SpatiaLite, but not SQLite. Django's documentation highlights that there is an extension module available that provides support, but there are problems with this suggestion:

  • This extension module is not provided compiled and only implements STDDEV and VARIANCE.
  • Django uses STDDEV_POP and STDDEV_SAMP for StdDev(); VAR_POP and VAR_SAMP for Variance() - so they wouldn't work anyway.

As an alternative, we can make use of the statistics module added to the standard library in Python 3.4.

Change History (4)

comment:1 by Nick Pope, 5 years ago

Has patch: set
Owner: changed from nobody to Nick Pope
Status: newassigned
Version: 2.1master

comment:2 by Simon Charette, 5 years ago

Triage Stage: UnreviewedAccepted

comment:3 by Mariusz Felisiak, 5 years ago

Cc: Mariusz Felisiak added

comment:4 by Tim Graham <timograham@…>, 5 years ago

Resolution: fixed
Status: assignedclosed

In 83677faf:

Fixed #30056 -- Added SQLite support for StdDev and Variance functions.

Note: See TracTickets for help on using tickets.
Back to Top