[C++] GetSchema labels its null check on each schema field as "DictionaryEncoding.indexType"
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 1/5
- Tiempo estimado
- Menos de una hora
- Aptitud para principiantes
- 88/100
Línea de trabajo
Abre cpp/src/arrow/ipc/metadata_internal.cc alrededor del bucle GetSchema (las líneas enlazadas ~1450–1457). El CHECK_FLATBUFFERS_NOT_NULL en cada campo usa la etiqueta DictionaryEncoding.indexType; o bien elimina esa comprobación (como sugiere el comentario cercano) o relabélala a algo como Schema.fields[i]. La comprobación real de DictionaryEncoding.indexType permanece en ~901. Listo cuando ese bucle ya no informe el nombre de campo incorrecto.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
[!NOTE]
I discovered this issue and wrote it up with help from Claude Opus 5.5.
Describe the enhancement requested
In GetSchema in cpp/src/arrow/ipc/metadata_internal.cc, the loop over a schema's fields checks each field for null with the wrong label:
for (int i = 0; i < num_fields; ++i) {
const flatbuf::Field* field = schema->fields()->Get(i);
// XXX I don't think this check is necessary (AP)
CHECK_FLATBUFFERS_NOT_NULL(field, "DictionaryEncoding.indexType");
RETURN_NOT_OK(
FieldFromFlatbuffer(field, field_pos.child(i), dictionary_memo, &fields[i]));
}
The value being checked is a Field, not DictionaryEncoding.indexType. If the check ever failed, it would report Unexpected null field DictionaryEncoding.indexType in flatbuffer-encoded metadata. That message already belongs to the real check on dictionary index types at line 901, so the two errors would be indistinguishable.
As the comment beside it suggests, the check also appears unable to fail. For a vector of tables, the vendored flatbuffers IndirectHelper<Offset<T>>::Read returns the element's address plus its stored offset, so fields()->Get(i) doesn't return null. The function already checks schema->fields() itself for null, with the correct label Schema.fields.
Either option would fix it:
- Remove the check, as the comment suggests.
- Keep it with an accurate label, such as
"Schema.fields[i]".
I found this while looking into how the reader handles a missing DictionaryEncoding.indexType, which is reported separately at #51779.
- Lenguaje dominante
- C++
- Estrellas
- 17.2k
- Forks
- 4.4k
- Merge medio
- 4 d 1 h
- PR fusionados (30 d)
- 87
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
-
[C++][Python] IPC reader rejects a DictionaryEncoding without indexType, which the format allowsPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. AbiertoComponent: C++ Component: Python
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
[R] Silent loss of metadata integrity for date-time and numeric attributes in write_parquet()/read_parquet()Posiblemente ocupada @james-finn-travers la tomó hace 6 días. AbiertoComponent: R Type: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
apache/arrow#51695 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
[C++][Parquet] Plaintext-footer files written with AES_GCM_CTR_V1 record AES_GCM_V1 as the encryption algorithm and cannot be readPosiblemente ocupada @YusefSyed la tomó hace 6 días. AbiertoType: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
[R] Expose ignore_extra_columns and pad_short_rows CSV parse optionsPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. AbiertoComponent: R good-first-issue Type: enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
Component: C++
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
Los mantenedores suelen responder en 1 día
Todos los issues de apache/arrow
Issues similares
-
Status: Awaiting triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
espressif/arduino-esp32#12984 ·
Los mantenedores suelen responder en 1 día
-
torch_ops/logprob.cu does not compile with the serving container's nvcc (13.3.73); check_torch_ops.py cannot run as shippedPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 Menos de una hora Aptitud para principiantes 72/100
ashhart/TensorFold#535 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 Menos de una hora Aptitud para principiantes 78/100
sudoevolve/EUI-NEO#95 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día