python / python/cpython

Build SQLite with SQLITE_ENABLE_PERCENTILE for Windows and CPython-3.15+

Offen
#152,023 3 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

extension-modules topic-sqlite3 type-feature
Vorherrschende Sprache
Python
Sterne
77.2k
Forks
35.9k
PR-Merge-Kennzahlen
PR-Kennzahlen ausstehend

Beschreibung

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
  • gh-153867
  • gh-153869
  • gh-155101
  • gh-156048
  • gh-156446
  • gh-156448

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne mit PCbuild/sqlite3.vcxproj bei den im Issue referenzierten SQLite-Kompilierungsdefinitionen und untersuche, wie CPython SQLite-Erweiterungen für Windows aktiviert. Überprüfe, dass der Windows-Build die Median- und Perzentilfunktionen von SQLite zur Laufzeit bereitstellt, und nutze die verlinkten PRs, um die aktuelle Implementierung und Validierung zu verstehen.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
python, sqlite
Bereich
build-system, databases
Issue-Typ
Feature
Schwierigkeit
1/5
Geschätzter Aufwand
Unter einer Stunde
Aktivitätsstatus
Veraltet
Klarheit
Klar beschrieben
Anfängerfreundlichkeit
30/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.