Refactor the Statistics classes to match the specialized pattern used throughout parquet
- Vorherrschende Sprache
- Java
- Sterne
- 3.1k
- Forks
- 1.6k
- Ø Merge
- 3 T. 12 Std.
- Gemergte PRs (30 T.)
- 33
Beschreibung
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.*
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Beginne damit, die Statistics-Klassen und die vorhandenen primitivspezialisierten Methoden wie writeInt, writeLong und writeDouble zu finden. Vergleiche die aktuellen Designs von InstStatistics, LongStatistics und DoubleStatistics mit den umgebenden spezialisierten Mustern. Als abgeschlossen gilt die Arbeit, wenn die Statistics-Implementierung einem einheitlichen Muster folgt und die vorgeschlagene ParquetTypeVisitor-Schnittstelle als Teil des Designs geklärt ist.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- java
- Bereich
- data-engineering
- Issue-Typ
- Refactoring
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 25/100