Refactor the Statistics classes to match the specialized pattern used throughout parquet
- Lenguaje dominante
- Java
- Estrellas
- 3.1k
- Forks
- 1.6k
- Merge medio
- 3 d 12 h
- PR fusionados (30 d)
- 33
Descripción
Because Parquet tries very hard to avoid autoboxing, most of the core classes are specialized for each primitive by having a method for each type, eg:
```Java
void writeInt(int x);
void writeLong(long x);
void writeDouble(double x);
```
and so on.
However, the statistics classes take the other approach of having an InstStatistics class, a LongStatistics class, a DoubleStatistics class and so on. I think it's worth going for consistency and picking a pattern and sticking to it. Seems like the first pattern I mentioned is currently the more common one.
We may want to take this one step further and define an interface that these all conform to, eg:
```Java
public interface ParquetTypeVisitor {
void visitInt(int x);
void visitLong(long x);
void visitDouble(double x);
}
```
**Reporter**: [Alex Levenson](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=alexlevenson) / @isnotinvain
**Note**: *This issue was originally created as [PARQUET-32](https://issues.apache.org/jira/browse/PARQUET-32). Please see the [migration documentation](https://issues.apache.org/jira/browse/PARQUET-2502) for further details.*
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Línea de trabajo
Comienza localizando las clases Statistics y los métodos existentes especializados para tipos primitivos, como writeInt, writeLong y writeDouble. Compara los diseños actuales de InstStatistics, LongStatistics y DoubleStatistics con los patrones especializados circundantes. Se considera terminado cuando la implementación de Statistics sigue un patrón coherente y la interfaz ParquetTypeVisitor propuesta queda resuelta como parte del diseño.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- java
- Área
- data-engineering
- Tipo de issue
- Refactorización
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 25/100