"Leaking" of `_expr_*` columns into result relations
Los mantenedores suelen responder en 5 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 35/100
Línea de trabajo
Start by reading the compiler behavior behind the minimal PRQL example and the related discussion in issues #4633 and #3130. The issue does not identify a file, test, or settled implementation approach, so first trace how intermediate _expr_* columns enter the generated SQL. Done means the output relation excludes those internal columns without changing the expected user-visible result across supported backends.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
What happened?
prqlc produces SQL which uses _expr_* columns internally for internal intermediate calculation results. These should never end up in the resulting output relation.
The current situation is understandable since not all SQL dialects support the SELECT EXCLUDE _expr_* syntax and without schema information about the input relations, the compiler cannot explicitly enumerate the output columns.
However if we think about PRQL from first principles as "a language for Relational Algebra" then I hazard the guess that we all agree that such internal implementation details should not form part of the output.
As pointed out in https://github.com/PRQL/prql/issues/4633#issuecomment-2220485438, such extraneous columns can also cause errors in downstream calcuations.
One of my personal ambitions for PRQL is to extend it beyond the current SQL backends to also include other "relational" languages and query engines such as Pandas, Polars, (Power Query) M Language, etc... to name just a few. In those cases the _expr_* columns should also not show up and ideally PRQL should produce consistent results between different backends.
PRQL input
from [{a=1}]
derive a=2
SQL output
WITH table_0 AS (
SELECT
1 AS a
)
SELECT
a AS _expr_0,
2 AS a
FROM
table_0
-- Generated by PRQL compiler version:0.12.2 (https://prql-lang.org)
Expected SQL output
WITH table_0 AS (
SELECT
1 AS a
)
SELECT
2 AS a
FROM
table_0
MVCE confirmation
- Minimal example
- New issue
Anything else?
I'm not sure what the solution would be so just raising this as a tracking issue and discussion point.
There are some more examples in https://github.com/PRQL/prql/issues/3130#issuecomment-2222335851.
- Lenguaje dominante
- Rust
- Estrellas
- 10.9k
- Forks
- 261
- Merge medio
- 4 d 7 h
- PR fusionados (30 d)
- 77
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de PRQL/prql
-
Underscore does not work as expectedPosiblemente ocupada @prql-bot la tomó hace 6 días. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
PRQL/prql#6518 · 1 comentario ·
Los mantenedores suelen responder en 5 días
-
prqlc Debug Report HTML Does Not Escape Source File Name, Enabling Stored XSS via PRQLC_DEBUG_LOGAbiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
PRQL/prql#6502 · 1 comentario ·
Los mantenedores suelen responder en 5 días
-
Add `.prql` to linguistAbiertofriendliness integrations
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
PRQL/prql#1636 · 2 comentarios · 2 reacciones ·
Los mantenedores suelen responder en 5 días
-
review-runs-tracking: 2026-11Abiertoreview-runs-tracking
Dificultad 3/5 Medio día Aptitud para principiantes 5/100
PRQL/prql#6513 · 1 comentario ·
Los mantenedores suelen responder en 5 días
-
Formatted SQL adds spaces inside the next string literal after a string ending in a backslashQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abiertobug
Dificultad 4/5 1-2 días Aptitud para principiantes 38/100
PRQL/prql#6500 · 2 comentarios ·
Los mantenedores suelen responder en 5 días
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Non-`main` default branchesAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
max-sixty/worktrunk#4727 · 7 comentarios · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
follow-up
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
carrick-sh/carrick#1859 ·
Los mantenedores suelen responder en 1 día
-
crate: spate-kafka documentation priority: medium
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día