apache / apache/iceberg-cpp

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

未关闭
#730 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
C++
星标
221
派生
124
平均合并
1 天 17 小时
30 天内合并 PR
21

描述

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.

贡献指南

这个仓库没有索引到贡献指南

调研方向

从 Iceberg v3 的 default-values 规范开始,跟踪 SchemaField、JSON serde 以及范围中指定的读取和写入路径。完成的标准是实现 initial-default 和 write-default 行为,包括读取缺失列、写入省略的值,以及所述的 required-column 和版本验证。

由索引模型根据 Issue 内容生成。

评估

技术栈
cpp
领域
data-engineering
Issue 类型
功能
难度
4/5
预计耗时
3-5 天
活跃度
冷清
描述清晰度
基本清楚
新手友好度
42/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。