apache / apache/iceberg-python

ArrowScan materializes entire FileScanTask into memory

Fechada
#3,036 6 comentários 0 reações 0 responsáveis Ver no GitHub
stale
Linguagem predominante
Python
Estrelas
1.1k
Forks
581
Merge médio
1d 13h
PRs com merge (30d)
76

Descrição

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

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Direção de pesquisa

Comece em pyiceberg.io.pyarrow rastreando a iteração em lotes de FileScanTask de ArrowScan e a construção do PyArrow ds.Scanner. Confirme que os lotes são produzidos sem materializar antecipadamente o iterador e que batch_size chega ao scanner; considera-se concluído quando arquivos grandes podem ser processados sem exigir que a tarefa inteira esteja na memória.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
python
Domínio
data-engineering, performance
Tipo de issue
Funcionalidade
Dificuldade
3/5
Tempo estimado
1-2 dias
Status de atividade
Ativa
Clareza
Razoavelmente clara
Facilidade para iniciantes
65/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.