parquet/file: a panic recovered in WriteBatch is not kept, so Close writes a footer for rows with no values
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 35/100
Línea de trabajo
Start by reading the WriteBatch error recovery and Close paths for column chunk writers, then compare how FlushCurrentPage errors are saved, as referenced in issues #1597 and #1621. Reproduce the supplied example and check the resulting row count and footer behavior; done means Close returns the recovered error and no footer is written.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the bug, including details regarding any error messages, version, and platform.
WriteBatch returns an error when it recovers a panic, but the error is not kept on the column, so every Close after it returns nil and the file ends up with a footer for rows that have no values. FlushCurrentPage errors are kept (#1597, #1621), recovered panics are not. This is the case @zeroshade noted in the #1621 review. On main:
root, _ := schema.NewGroupNode("schema", parquet.Repetitions.Required, schema.FieldList{
schema.NewInt32Node("col", parquet.Repetitions.Optional, -1),
}, -1)
var buf bytes.Buffer
props := parquet.NewWriterProperties(parquet.WithDictionaryDefault(false))
w := file.NewParquetWriter(&buf, root, file.WithWriterProps(props))
rg := w.AppendRowGroup()
col, _ := rg.NextColumn()
_, err := col.(*file.Int32ColumnChunkWriter).WriteBatch([]int32{1}, []int16{1, 1, 1}, nil)
fmt.Println(err) // unknown error type: runtime error: slice bounds out of range [:3] with capacity 1
fmt.Println(col.Close(), rg.Close(), w.Close()) // <nil> <nil> <nil>
r, _ := file.NewParquetReader(bytes.NewReader(buf.Bytes()))
fmt.Println(r.MetaData().NumRows()) // 3; reading the column back gives 0 rows and no error
Expected: Close returns the saved error and no footer is written, same as for a FlushCurrentPage error.
Component(s)
Parquet
- Lenguaje dominante
- Assembly
- Estrellas
- 423
- Forks
- 188
- Merge medio
- 1 d 7 h
- PR fusionados (30 d)
- 164
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de apache/arrow-go
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
apache/arrow-go#1591 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
arrow/compute: safe float to integer cast skips the truncation check in sliced arrays with nullsPosiblemente ocupada @mansur-akhmadi la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 1/100
Los mantenedores suelen responder en 1 día
-
Type: bug
Dificultad 3/5 1-2 días Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
ipc: stream reader accepts an invalid flatbuffer schema and decimal precision 0Posiblemente ocupada @AynSiddiqui la tomó hace 7 días. Abierto
apache/arrow-go#1676 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de apache/arrow-go
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
omacom/omarchy#21286 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
-
Rejected regionUrl errors don't say how to recover when an agent passes the organization's web URLAbiertomcp-feedback-pattern
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
getsentry/toolkit#2777 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
libsndfile/libsndfile#1239 ·