Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Make the order of encodings in column metadata deterministic

Đang mở
#3,215 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
58/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
java
Lĩnh vực
data

Hướng nghiên cứu

Bắt đầu tại org.apache.parquet.format.converter.ParquetMetadataConverter::toFormatEncodings và kiểm tra cách HashSet các giá trị Encoding trở thành danh sách được trả về. Công việc hoàn tất khi việc ghi dữ liệu tương đương tạo ra siêu dữ liệu Encoding theo thứ tự ordinal tăng dần mang tính xác định, loại bỏ thứ tự phụ thuộc vào tiến trình.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
Java
Star
3.1k
Fork
1.6k
Merge trung bình
6 ngày 16 giờ
Pull request đã merge (30 ngày)
36

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

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của apache/parquet-java

Tất cả issue của apache/parquet-java

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.