Refactor the Statistics classes to match the specialized pattern used throughout parquet
- Ngôn ngữ chính
- Java
- Star
- 3.1k
- Fork
- 1.6k
- Merge trung bình
- 3 ngày 12 giờ
- Pull request đã merge (30 ngày)
- 33
Mô tả
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.*
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Hướng nghiên cứu
Bắt đầu bằng cách xác định các lớp Statistics và những phương thức hiện có được chuyên biệt hóa cho kiểu nguyên thủy, chẳng hạn như writeInt, writeLong và writeDouble. So sánh các thiết kế hiện tại của InstStatistics, LongStatistics và DoubleStatistics với các mẫu chuyên biệt xung quanh. Công việc được xem là hoàn tất khi phần triển khai Statistics tuân theo một mẫu nhất quán và interface ParquetTypeVisitor được đề xuất được giải quyết như một phần của thiết kế.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- java
- Lĩnh vực
- data-engineering
- Loại issue
- Tái cấu trúc
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 25/100