apache / apache/iceberg-cpp

Support column default values (initial-default / write-default)

Đang mở
#730 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
C++
Star
221
Fork
124
Merge trung bình
1 ngày 16 giờ
Pull request đã merge (30 ngày)
21

Mô tả

Sub-issue of #637 (item 2: Column Default Values).
Iceberg v3 allows schema evolution with column default values (spec — Default values (https://iceberg.apache.org/spec/#default-values)):
- initial-default: returned for rows that predate the column's addition, i.e. applied on the read path when a data file does not contain the field.
- write-default: applied on the write path when a writer does not supply a value or the column.

Planned scope:
- [x] Schema model: carry initial-default / write-default on SchemaField
- [x] JSON serde: parse/write the two fields using single-value serialization
- [x] Read path: project missing columns as the initial-default constant instead of null when reading data files written before the column existed
- [x] Write path: apply write-default where values are omitted; validation (e.g. adding a required column requires an initial-default, v3+ gating)
I plan to work on this and will send PR(s) referencing this issue.

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

Hướng nghiên cứu

Bắt đầu với đặc tả default-values của Iceberg v3 và lần theo SchemaField, JSON serde cũng như các đường dẫn đọc và ghi được nêu trong phạm vi. Được xem là hoàn tất khi hành vi initial-default và write-default được triển khai, bao gồm việc đọc các cột bị thiếu, ghi các giá trị bị bỏ qua và việc xác thực required-column cùng phiên bản như đã nêu.

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

Đánh giá

Công nghệ
cpp
Lĩnh vực
data-engineering
Loại issue
Tính năng
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
42/100

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.