VALUES list rejects mixing an extension-typed value with its bare storage type ("Inconsistent metadata across values list")

Aberta
#26,917 2 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

@Atharva884 já está trabalhando nisso.

Desde 1/11/2026.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
35/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
rust, sql
Domínio
databases

Direção de pesquisa

Start in LogicalPlanBuilder at the inconsistent-metadata check for VALUES, and read how the values list compares Arrow FieldMetadata; cast_extension_type_metadata.slt shows the test-only UUID type and reproduces the two-row case. Compare that path with how INSERT INTO plans VALUES against a target schema. Done means a decided unification rule is implemented and covered by a sqllogictest for the UUID example.

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

Descrição

Describe the bug

A standalone VALUES list fails to plan when one row carries extension-type metadata and another row is the bare storage type, even though the storage types match:

Error during planning: Inconsistent metadata across values list at row 1 column 0. Was FieldMetadata { inner: {"ARROW:extension:name": "arrow.uuid"} } but found FieldMetadata { inner: {} }

The same values are accepted by INSERT INTO <uuid table> VALUES (...), which plans VALUES against the target schema.

Found while reviewing https://github.com/apache/datafusion/pull/21714. The check lives in LogicalPlanBuilder on main and reproduces there with the test-only UUID type planner in cast_extension_type_metadata.slt, so it predates that PR.

To Reproduce

On #21714 (or in cast_extension_type_metadata.slt on main):

VALUES (CAST(X'00010203040506070809000102030506' AS UUID)), (X'00010203040506070809000102030507');
-- Error during planning: Inconsistent metadata across values list at row 1 column 0 ...
Expected behavior

This is arguably a usability gap rather than a correctness bug: an explicit error is better than silently picking a type. But other systems unify these:

  • Postgres: VALUES ('...'::uuid), ('...') → column typed uuid.
  • DuckDB: same, column typed UUID.

Possible behavior: when the storage types match and the only difference is that some rows have no metadata, use the extension type (as a cast), instead of erroring.

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.