Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Make the order of encodings in column metadata deterministic

Abierto
#3,215 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
58/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Estancado
Stack tecnológico
java
Área
data

Línea de trabajo

Comience en org.apache.parquet.format.converter.ParquetMetadataConverter::toFormatEncodings e inspeccione cómo el HashSet de valores de Encoding se convierte en la lista devuelta. El trabajo estará terminado cuando la escritura de datos equivalentes produzca metadatos de Encoding en un orden ordinal ascendente determinista, eliminando el orden dependiente del proceso.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Type: enhancement
Describe the enhancement requested

Background
The list of encodings used for a column is stored in the column metadata in the Parquet file footer.

The elements in this list are enumeration constants (org.apache.parquet.format.Encoding), which are collected in a HashSet when the records and fields are written. Later, when the footer is written, the set of enum constants are converted to a temporary list using the HashSet’s iteration order.

Since Enum::hashCode delegates to Object::hashCode (or, in later JDK versions, to System::identityHashCode), the order of the enum constants in this list can vary between runs in different processes, and thus files with identical encodings can represent this list differently (the elements may appear in different order).

Rationale for changing this behaviour
Two processes running the same version of parquet-java and having identical writer configurations can still produce files that are different at the binary level for the exact same written data.

For redundancy reasons, it is not uncommon to write data to Parquet files on two different machines. To verify that the same data has been written on both machines, it is currently not sufficient to compare the files ate the binary level. Instead, the files must be decoded and their actual data must be compared to ensure they are equal.

If the files can be made identical at the binary level, this verification process would be simplified.

Suggested change
The list of encodings is created in org.apache.parquet.format.converter.ParquetMetadataConverter::toFormatEncodings. A simple solution is to sort this list before it is returned, i.e. always return the Encoding enum constants in ascending ordinal order.

Component(s)

Core

Lenguaje dominante
Java
Estrellas
3.1k
Forks
1.6k
Merge medio
6 d 16 h
PR fusionados (30 d)
36

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de apache/parquet-java

Todos los issues de apache/parquet-java

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.