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

Aberta
#27,223 5 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

@raghavyadav01 já está trabalhando nisso.

Desde 11/11/2026.

  • #27338 de @raghavyadav01 — aberto

Avaliação

Dificuldade
3/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
65/100
Tipo de issue
Bug
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
rust, sql
Domínio
backend, databases

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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.

Linguagem predominante
Rust
Estrelas
9.6k
Forks
2.6k
Merge médio
3d 4h
PRs com merge (30d)
345

Preparar o ambiente

Abrir no Codespaces

Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de apache/datafusion

Todas as issues de apache/datafusion

Issues semelhantes

Mais issues de Rust

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.