`append` twice with null columns leads to runtime Google BigQuery SQL error `UNION ALL has incompatible types`
Los mantenedores suelen responder en 3 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 45/100
Línea de trabajo
Start with the related issue #5341 and trace how PRQL lowers nested append operations for the BigQuery target. Reproduce the supplied PRQL input and inspect the generated SQL and relevant tests; the issue names no source files or tests. Done means the generated BigQuery SQL uses subqueries and CTEs so repeated appends with null columns run without incompatible UNION ALL types.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
What happened?
- Doing two
appendin Google BigQuery with null columns. prqlcoutputs a query that leads to runtime failureUNION ALL has incompatible types
PRQL input
prql target:sql.bigquery
from beers
select { name, price_per_l, alcohol_degree = null, brewing_date = null }
sort { +price_per_l }
take 2
append (
from beers
select { name, price_per_l = null, alcohol_degree, brewing_date = null }
sort { -alcohol_degree }
take 2
append (
from beers
select { name, price_per_l = null, alcohol_degree = null, brewing_date }
sort { -brewing_date }
take 2
)
)
SQL output
(
SELECT
name,
price_per_l,
NULL AS alcohol_degree,
NULL AS brewing_date
FROM
beers
ORDER BY
price_per_l
LIMIT
2
)
UNION
ALL (
SELECT
name,
NULL AS price_per_l,
alcohol_degree,
NULL AS brewing_date
FROM
beers
ORDER BY
alcohol_degree DESC
LIMIT
2
)
UNION
ALL (
SELECT
name,
NULL AS price_per_l,
NULL AS alcohol_degree,
brewing_date
FROM
beers
ORDER BY
brewing_date DESC
LIMIT
2
)
Expected SQL output
WITH cte0 as (
SELECT
name,
price_per_l
FROM
beers
ORDER BY
price_per_l
LIMIT
2
), cte1 as (
SELECT
name,
alcohol_degree,
FROM
beers
ORDER BY
alcohol_degree DESC
LIMIT
2
), cte2 as (
SELECT
name,
NULL AS price_per_l,
NULL AS alcohol_degree,
brewing_date
FROM
beers
ORDER BY
brewing_date DESC
LIMIT
2
)
(
SELECT
name,
price_per_l,
NULL AS alcohol_degree,
NULL AS brewing_date
FROM
cte0
)
UNION
ALL (
SELECT
name,
NULL AS price_per_l,
alcohol_degree,
NULL AS brewing_date
FROM
cte1
)
UNION
ALL (
SELECT
name,
NULL AS price_per_l,
NULL AS alcohol_degree,
brewing_date
FROM
cte2
)
MVCE confirmation
- Minimal example
- New issue
Anything else?
Related to https://github.com/PRQL/prql/issues/5341.
Unfortunately, Google BigQuery is even more picky, and needs both subqueries and CTEs to succesfully infer the types here.
- Lenguaje dominante
- Rust
- Estrellas
- 10.9k
- Forks
- 261
- Merge medio
- 3 d 21 h
- PR fusionados (30 d)
- 84
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 3 días. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
PRQL/prql#6518 · 1 comentario ·
Los mantenedores suelen responder en 3 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 3 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 3 días
-
Dificultad 4/5 1-2 días Aptitud para principiantes 12/100
PRQL/prql#6517 · 1 comentario ·
Los mantenedores suelen responder en 3 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 3 días
Issues similares
-
A match arm above the largest i64 is compared as 0Posiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 83/100
DioxusLabs/dioxus#6063 ·
Los mantenedores suelen responder en 1 día
-
`nsh-core` fails to compile when taffy's default `calc` feature is enabled elsewhere in the graphAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
longbridge/nsh#966 ·
Los mantenedores suelen responder en 1 día
-
Windows docs: pin a tested ConPTY version for Kitty graphics; 1.25.260930003 corrupts large uploadsAbierto
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100
raphamorim/rio#2021 ·
Los mantenedores suelen responder en 1 día
-
Docs: status text is out of dateAbiertodocumentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
non7top/sigstore-shell#38 ·
Los mantenedores suelen responder en 1 día