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

Binary statistics truncation test ignores its configured truncation length

Đang mở Phù hợp với người mới
#3,820 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 2 ngày

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
88/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
java
Lĩnh vực
testing-qa

Hướng nghiên cứu

Bắt đầu trong TestParquetMetadataConverter.testBinaryStatsWithTruncation và kiểm tra các overload của ParquetMetadataConverter được helper sử dụng. Chạy test tập trung đó, chuyển nó sang overload có độ dài cắt ngắn tường minh, và đảm bảo các assertion bao quát các giá trị đã cắt ngắn chính xác cũng như các ranh giới kích thước kết hợp nghiêm ngặt: 4095 byte được chấp nhận và 4096 byte bị bỏ qua.

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

Mô tả

Describe the bug, including details regarding any error messages, version, and platform.

In TestParquetMetadataConverter.testBinaryStatsWithTruncation, the helper creates new ParquetMetadataConverter(truncateLen) but then calls metadataConverter.toParquetStatistics(stats). That method is static and delegates to DEFAULT_STATISTICS_TRUNCATE_LENGTH (Integer.MAX_VALUE), so the requested length never reaches conversion.

The existing assertions do not detect this: unchanged under-limit bounds satisfy the non-strict ordering checks, while oversized inputs are expected to have no bounds, matching the unintended default path. The test therefore does not exercise the finite truncation it describes.

This remains present at master 4b37c193e2f796d553a20cc57ec9835ceaa1c95c. For a deterministic example, minimum a repeated 60 times and maximum b repeated 70 times with length 1 should produce min_value="a" and max_value="c" through the explicit overload. The current helper uses the default overload and leaves those bounds untruncated.

The proposed correction is test-only: call toParquetStatistics(stats, truncateLen), use deterministic exact-byte assertions, and cover the strict 4095-byte accepted/4096-byte omitted combined-size boundary before and after truncation. Constructor validation and current null-count omission behavior remain unchanged.

#3819 addresses null-count serialization in production; this issue concerns a separate gap in truncation-test coverage and does not propose changing that behavior.

Component(s)

Core (parquet-hadoop)

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

Chuẩn bị môi trường

Chúng tôi chưa kiểm tra các tệp thiết lập môi trường của dự án này. Hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

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.