array_concat of a 2D and a 1D list returns `[NULL]` or `NULL` for an all-NULL row depending on the other rows in the batch

Abierto
#27,223 5 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@raghavyadav01 ya está trabajando en esto.

Desde el 11/11/2026.

  • #27338 de @raghavyadav01 — abierto

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
65/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
rust, sql

Línea de trabajo

Start by reproducing the batch-size-dependent result with the SQL queries in the issue, then inspect the array_concat implementation and array_concat.slt around line 388. Check how the all-NULL row is handled when combined with a non-NULL row versus evaluated alone. Done means that row returns NULL consistently, with the regression covered by the SQL logic test.

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

Descripción

Describe the bug

For a row where both arguments are NULL, array_concat(<2D list>, <1D list>) returns [NULL] when the batch also has a non-NULL row, and NULL when that row is evaluated on its own. The same row should give the same result regardless of batch contents. array_concat of two 1D lists returns NULL in both cases.

To Reproduce
CREATE TABLE t AS VALUES
  (make_array(1, 2), make_array(make_array(30, 40))),
  (CAST(NULL AS INT[]), CAST(NULL AS INT[][]));

SELECT array_concat(column2, column1) FROM t;
-- [[30, 40], [1, 2]]
-- [NULL]

SELECT array_concat(column2, column1) FROM t WHERE column1 IS NULL;
-- NULL

SELECT array_concat(column1, column1) FROM t;
-- [1, 2, 1, 2]
-- NULL

On main (5191bcc46). It also shows up in array_concat.slt:388 when the suite runs at batch size 1–3 (found while sweeping batch sizes for #26700).

Expected behavior

The all-NULL row returns NULL in both queries, like the 1D case.

Lenguaje dominante
Rust
Estrellas
9.6k
Forks
2.6k
Merge medio
3 d 4 h
PR fusionados (30 d)
345

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

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.

Más de apache/datafusion

Todos los issues de apache/datafusion

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.