python / python/cpython

Build SQLite with SQLITE_ENABLE_PERCENTILE for Windows and CPython-3.15+

Abierto
#152,023 3 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

extension-modules topic-sqlite3 type-feature
Lenguaje dominante
Python
Estrellas
77.2k
Forks
35.9k
Métricas de merge de PR
Métricas de PR pendientes

Descripción

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

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Comienza con PCbuild/sqlite3.vcxproj en las definiciones de compilación de SQLite mencionadas en el issue, e inspecciona cómo CPython habilita las extensiones de SQLite para Windows. Verifica que la compilación de Windows exponga las funciones de mediana y percentil de SQLite en tiempo de ejecución, usando los PRs enlazados para comprender la implementación y validación actuales.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
python, sqlite
Área
build-system, databases
Tipo de issue
Nueva funcionalidad
Dificultad
1/5
Tiempo estimado
Menos de una hora
Estado de actividad
Estancado
Claridad
Bien especificado
Aptitud para principiantes
30/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.