apache / apache/iceberg-python
ArrowScan materializes entire FileScanTask into memory
- Langage dominant
- Python
- Étoiles
- 1.1k
- Forks
- 581
- Merge moyen
- 1 j 17 h
- PR mergées (30 j)
- 77
Description
### 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)
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Piste de recherche
Commencez dans pyiceberg.io.pyarrow en suivant l’itération des lots de FileScanTask de ArrowScan et la construction du PyArrow ds.Scanner. Vérifiez que les lots sont fournis sans matérialiser au préalable l’itérateur et que batch_size atteint le scanner ; le travail est terminé lorsque de gros fichiers peuvent être traités sans nécessiter que la tâche complète soit en mémoire.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- python
- Domaine
- data-engineering, performance
- Type d'issue
- Fonctionnalité
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- Active
- Clarté
- Plutôt claire
- Accessibilité débutants
- 65/100