`partitions` metadata table merges NULL partitions from different specs
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 18/100
Hướng nghiên cứu
Start by running the reproduction script in the issue against a local Spark session to confirm that the partitions table merges the NULL-valued rows across specs 0 and 2 while the control table does not. Pull request 19148 is already open against this bug, so read it and its review before writing anything. Done means the NULL-partition case yields one row per spec_id, matching the control table and the files table.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Apache Iceberg version
main (development)
Query engine
Spark
Please describe the bug 🐞
After DROP PARTITION FIELD p and ADD PARTITION FIELD q, a file with p = NULL (old spec) and a file with q = NULL (new spec) are reported by the partitions table as one row with the new spec_id and summed counts; spec 0 disappears. With non-NULL values there is one row per spec. Reproduced on main (2e12b22, 2026-11-25) and 1.12.0, Spark 3.5.5.
Reproduction
CREATE TABLE local.t (id INT, p STRING, q STRING) USING iceberg PARTITIONED BY (p);
INSERT INTO local.t VALUES (1, NULL, 'old');
ALTER TABLE local.t DROP PARTITION FIELD p;
ALTER TABLE local.t ADD PARTITION FIELD q;
INSERT INTO local.t VALUES (2, 'new', NULL);
SELECT 'parts' AS marker, spec_id, partition, record_count, file_count FROM local.t.partitions ORDER BY spec_id;
SELECT 'files' AS marker, spec_id, partition FROM local.t.files ORDER BY spec_id;
-- control: non-NULL values
CREATE TABLE local.c (id INT, p STRING, q STRING) USING iceberg PARTITIONED BY (p);
INSERT INTO local.c VALUES (1, 'old', 'old');
ALTER TABLE local.c DROP PARTITION FIELD p;
ALTER TABLE local.c ADD PARTITION FIELD q;
INSERT INTO local.c VALUES (2, 'new', 'new');
SELECT 'control' AS marker, spec_id, partition, record_count, file_count FROM local.c.partitions ORDER BY spec_id;
Expected vs. actual
| Expected | Actual | |
|---|---|---|
local.t.partitions |
0 {"p":null,"q":null} 1 12 {"p":null,"q":null} 1 1 |
2 {"p":null,"q":null} 2 2 |
local.t.files |
0 ..., 2 ... |
0 {"p":null,"q":null}2 {"p":null,"q":null} |
local.c.partitions (control) |
one row per spec | 0 {"p":"old","q":null} 1 12 {"p":null,"q":"new"} 1 1 |
The old-spec partition (p is NULL) and the new-spec partition (q is NULL) are different partitions, but they are collapsed into one row and the old spec_id 0 disappears.
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
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của apache/iceberg
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Spark: Test INSERT targets with computed IDENTIFIER expressionsCó thể đã có người làm @shivadarshan-devadiga đã nhận 15 ngày trước. Đang mởimprovement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[Core] TestAvroPartitionStatsHandler fails on Windows due to unclosed partition statistics scanCó thể đã có người làm @Ankitkj1999 đã nhận 17 ngày trước. Đang mở
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Core: TableMetadata.Builder allows adding encryption keys to v1/v2 tablesCó thể đã có người làm @yusufyildiz34 đã nhận 37 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
apache/iceberg#18632 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Kafka: Filter empty strings and whitespace in IcebergSinkConfig stringToListCó thể đã có người làm @mohamed-elbrik đã nhận 42 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của apache/iceberg
Issue tương tự
-
bug vault
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
bancolombia/secrets-manager#150 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 92/100
HexaHexes/neoforge-mod-template#124 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
awaiting triage java new feature P2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 2 ngày
-
source-survicate: pagination reads pagination and stops after one page; substreams drop survey_idĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
OpenLiberty/open-liberty#36410 ·
Maintainer thường phản hồi trong vòng 1 ngày