apache / apache/iceberg-python

ArrowScan materializes entire FileScanTask into memory

Cerrado
#3,036 6 comentarios 0 reacciones 0 asignados Ver en GitHub
stale
Lenguaje dominante
Python
Estrellas
1.1k
Forks
581
Merge medio
1 d 17 h
PR fusionados (30 d)
77

Descripción

### 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)

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

Comienza en pyiceberg.io.pyarrow siguiendo la iteración por lotes de FileScanTask de ArrowScan y la construcción del PyArrow ds.Scanner. Confirma que los lotes se producen sin materializar de forma anticipada el iterador y que batch_size llega al scanner; se considera terminado cuando los archivos grandes pueden procesarse sin requerir que la tarea completa esté en memoria.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
python
Área
data-engineering, performance
Tipo de issue
Nueva funcionalidad
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Activo
Claridad
Bastante claro
Aptitud para principiantes
65/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.