apache / apache/iceberg-python
Add support for bucket expression to table scans
- 主要语言
- Python
- 星标
- 1.1k
- 派生
- 581
- 平均合并
- 1 天 17 小时
- 30 天内合并 PR
- 78
描述
### Feature Request / Improvement
For time partitioning, we can express time range expressions and they lead to partition pruning when planning an Arrow scan:
```py
scan = table.scan(
row_filter=And(
GreaterThanOrEqual("event_ts", start),
LessThan("event_ts", end),
)
)
arrow_table = scan.to_arrow()
```
It would be useful to be able to filter by other hidden partitioning transforms, such as buckets -- e.g. filtering on `bucket[16](user_id) in {0, 1, 2, 3}`, and getting partition pruning whenever possible based on the underlying table partitioning specs (falling back to filtering rows when files cannot be pruned).
贡献指南
这个仓库没有索引到贡献指南
调研方向
从 issue 中描述的 table.scan 和 scan.to_arrow 入口点开始,然后跟踪用于 Arrow 分区裁剪的现有时间范围表达式处理逻辑。检查分区规范和行过滤器是如何应用的;当 bucket[16](user_id) 这样的 bucket 表达式能够在可能的情况下裁剪文件,并在无法裁剪时回退到行过滤时,即视为完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- databases
- Issue 类型
- 功能
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 活跃
- 描述清晰度
- 基本清楚
- 新手友好度
- 55/100