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

Ouverte
#27,223 5 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

@raghavyadav01 y travaille déjà.

Depuis le 11/11/2026.

  • #27338 par @raghavyadav01 — ouverte

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
65/100
Type d'issue
Bug
Clarté
Clairement spécifiée
Activité
Active
Stack technique
rust, sql
Domaine
backend, databases

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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.

Langage dominant
Rust
Étoiles
9.6k
Forks
2.6k
Merge moyen
3 j 4 h
PR mergées (30 j)
345

Préparer son environnement

Ouvrir dans Codespaces

Lance le conteneur de développement du projet dans votre navigateur, avec votre propre compte GitHub.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de apache/datafusion

Toutes les issues de apache/datafusion

Issues similaires

Plus d'issues Rust

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.