parquet/pqarrow: `GetFieldReaders` does not prune schemas for nested structs

Aperta
#1,711 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
65/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
go
Ambito
backend

Direzione di ricerca

Start with pqarrow.FileReader.GetFieldReaders and trace how selected Parquet leaf indices produce the returned Arrow schema and record batches. Reproduce with a nested struct and a subset of leaf paths resolved by ColumnIndexByName; check that the schema retains only selected leaves and required enclosing fields and matches the projected batch data.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Type: bug
Describe the bug, including details regarding any error messages, version, and platform.

pqarrow.FileReader.GetFieldReaders projects selected Parquet leaf columns in returned record batches, but the returned Arrow schema retains unselected fields within nested structs.

This makes the returned schema inconsistent with the projected data and prevents using it as the schema for writing projected batches.

Reproduction

  1. Open a Parquet file containing nested struct fields.
  2. Resolve a small subset of nested leaf paths with ColumnIndexByName.
  3. Pass those indices to:
  _, schema, err := reader.GetFieldReaders(ctx, fieldIndices, nil)
  1. Inspect schema.

Expected behavior
The returned schema should contain only the selected leaf fields and their required enclosing struct/list fields.

Actual behavior
The returned record batches contain only selected data, but the returned Arrow schema includes all fields from enclosing nested structs.

Its happening with all versions.

Component(s)

Parquet

Lingua principale
Assembly
Stelle
423
Fork
188
Merge medio
1g 7h
PR unite (30g)
164

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di apache/arrow-go

Tutte le issue di apache/arrow-go

Issue simili

Altre issue su Backend & API Design

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.