ORC: `IS DISTINCT FROM` skips files where the column is all NULL

Đang mở
#19,191 1 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

@adiranjan25 đang làm issue này rồi.

Từ ngày 29/11/2026.

  • #19197 của @adiranjan25 — đang mở

Đá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
25/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
java, spark
Lĩnh vực
backend, databases

Hướng nghiên cứu

Start by checking the open pull request #19197, which is already linked to this issue. The report identifies ORC predicate pushdown for IS DISTINCT FROM as the failing path and gives SQL to reproduce it on Spark 3.5.5; compare the pushed and control query results. Done means the pushed query includes row 3 from the all-NULL stripe, matching the control.

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

Mô tả

bug
Apache Iceberg version

1.12.0 (latest release)

Query engine

Spark

Please describe the bug 🐞

On ORC tables, WHERE a IS DISTINCT FROM 7 silently drops the NULL rows of a in files (stripes) where a is all NULL. UPDATE and DELETE with this condition miss the same rows. Parquet is correct. Reproduced on main (9d4f6c7, 2026-11-28) and 1.12.0, Spark 3.5.5.

Reproduction
CREATE TABLE local.db.t (id INT, a INT) USING iceberg TBLPROPERTIES ('write.format.default'='orc');
INSERT INTO local.db.t VALUES (1, 3), (2, 7);
-- a file whose column a is all NULL
INSERT INTO local.db.t VALUES (3, NULL);

SELECT 'pushed', collect_list(id) FROM (SELECT id FROM local.db.t WHERE a IS DISTINCT FROM 7 ORDER BY id);
-- control: same predicate, not pushed down
SELECT 'not pushed', collect_list(id) FROM (SELECT id FROM local.db.t WHERE coalesce(a, a) IS DISTINCT FROM 7 ORDER BY id);
Expected
Query Result
pushed [1,3]
not pushed (control) [1,3]
Actual
Query Result
pushed [1]
not pushed (control) [1,3]
Willingness to contribute
  • I can contribute a fix for this bug independently
  • I would be willing to contribute a fix for this bug with guidance from the Iceberg community
  • I cannot contribute a fix for this bug at this time
Ngôn ngữ chính
Java
Star
9.5k
Fork
3.7k
Merge trung bình
2 ngày 2 giờ
Pull request đã merge (30 ngày)
170

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.