Truncate projection does not include the wrapped partition at the type minimum

Đang mở
#19,075 2 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 1 ngày

@Anurag-S1ngh đang làm issue này rồi.

Từ ngày 22/11/2026.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
30/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
databases

Hướng nghiên cứu

Start from ProjectionUtil.truncateInteger and truncateLong and compare them against TruncateUtil.truncateInt/truncateLong, which produce the wrapped value at the type minimum; the mismatch is only at the boundary values (-2147483648 for int, Long.MIN_VALUE for long). Read the existing projection unit tests for truncate transforms first, then add boundary cases that assert a LessThan/GreaterThan projection includes the wrapped partition. Done means the projection predicate and the writer's transform agree at the type minimum and the new boundary tests pass.

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

Mô tả

What happens

ProjectionUtil.truncateInteger and truncateLong project < and > without accounting for the wrapped partition that TruncateUtil.truncateInt and truncateLong produce at the type minimum.

With truncate[1000] on an int column, values from -2147483648 to -2147483001 truncate to 2147483296. LessThan("x", 0) projects to x_trunc <= -1000, which excludes 2147483296, so those rows are pruned.

Why it matters

The writer already emits the wrapped value, so the read side misses real data. The Python implementation has the same gap: apache/iceberg-python#4407 fixes EqualTo and In and leaves the range projection unchanged; the range case needs the reference implementation first.

Expected

A filter that can match a value in the wrapped partition should include that partition in its projection.

Ngôn ngữ chính
Java
Star
9.4k
Fork
3.7k
Merge trung bình
2 ngày 15 giờ
Pull request đã merge (30 ngày)
169

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

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/iceberg

Tất cả issue của apache/iceberg

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.