Skip to content

Build SQLite with SQLITE_ENABLE_PERCENTILE for Windows and CPython-3.15+ #152023

Description

@WKarel

Feature or enhancement

Proposal:

For Windows, CPython-3.15 requires SQLite-3.53.2. Since 3.51.0, the aggregate functions median and percentile are part of SQLite's amalgamation. I believe that this means that they are found to be mature. To have them available at run-time, SQLite needs to be built with SQLITE_ENABLE_PERCENTILE. Python's PCBuild activates a few built-in extensions of SQLite, but not this one yet.
Inserting SQLITE_ENABLE_PERCENTILE here might be everything needed.

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

I have not found previous discussions on this topic.

This discussion is about the ability to load SQLite extension modules at run-time, which is somehow related, as it can be used as an (inconvenient) fallback.

Another fallback is to implement these statistical functions in Python and bind them to a data base connection. This works, but is slower than having them built into SQLite (76s vs. 68s in my non-repesentative query).

Linked PRs

Activity

  1. StanFromIreland commented on Jun 23, 2026

    @StanFromIreland
    Member

    Our requirement is currently SQLite 3.15.2, as noted in the documentation. The file you're linking to is just what we use to pull our stored dependencies when we build Windows releases. Other redistributors (e.g., Astral's products, Homebrew, or Debian) need not use the same version.

  2. WKarel commented on Jun 23, 2026

    @WKarel
    Author

    @StanFromIreland I missed that. Sorry for the noise.

  3. StanFromIreland commented on Jun 23, 2026

    @StanFromIreland
    Member

    It doesn’t mean we can't expose them when available (if they are actually useful to users), we already do so for other APIs. But this isn't my area, so I'll leave this up to @erlend-aasland :-)

  4. added 3 commits that reference this issue on Jul 17, 2026
  5. added a commit that references this issue on Jul 18, 2026
  6. added a commit that references this issue on Aug 19, 2026
  7. added a commit that references this issue on Aug 27, 2026
  8. added a commit that references this issue on Aug 27, 2026
  9. added 2 commits that reference this issue on Sep 21, 2026
  10. added 2 commits that reference this issue on Sep 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions