apache / apache/iceberg-python
ArrowScan materializes entire FileScanTask into memory
- 主要語言
- Python
- 星號
- 1.1k
- 分支
- 588
- 平均合併
- 1 天 23 小時
- 30 天內合併 PR
- 84
描述
### Feature Request / Improvement
ArrowScan in PyIceberg does not support true streaming, leading to OOM failures when processing large files (file size > container size). While the API returns an iterator, the implementation eagerly materializes all record batches for a FileScanTask before yielding the first row.
Two primary bottlenecks were identified in the `pyiceberg.io.pyarrow` implementation:
1. The internal scan logic uses a `list()` constructor on the batch iterator, forcing the entire file into memory.
2. The `batch_size` parameter is not forwarded to the underlying PyArrow ds.Scanner, preventing granular memory control. Though, it does fallback to the standard
This behavior makes it impossible to process files larger than the available memory in distributed environments (e.g., Ray workers)
貢獻指南
這個儲存庫沒有索引到貢獻指南
研究方向
從 pyiceberg.io.pyarrow 開始,追蹤 ArrowScan 的 FileScanTask 批次迭代以及 PyArrow ds.Scanner 的建構。確認批次是在不預先完整具現化迭代器的情況下產生的,並且 batch_size 能傳遞到 scanner;當大型檔案無需將整個任務放入記憶體即可處理時,即表示完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- python
- 領域
- data-engineering, performance
- Issue 類型
- 功能
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 活躍
- 描述清晰度
- 基本清楚
- 新手友好度
- 65/100