Refactor the Statistics classes to match the specialized pattern used throughout parquet
- 主要语言
- Java
- 星标
- 3.1k
- 派生
- 1.6k
- 平均合并
- 3 天 12 小时
- 30 天内合并 PR
- 33
描述
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.*
贡献指南
这个仓库没有索引到贡献指南
调研方向
首先定位 Statistics 类以及现有的原始类型专用方法,例如 writeInt、writeLong 和 writeDouble。将当前的 InstStatistics、LongStatistics 和 DoubleStatistics 设计与周围的专用模式进行比较。完成的标准是 Statistics 实现遵循一种一致的模式,并且将提议的 ParquetTypeVisitor 接口作为设计的一部分解决。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java
- 领域
- data-engineering
- Issue 类型
- 重构
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 25/100