Support column default values (initial-default / write-default)
- 主要语言
- 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