Pluggable Backend Interface with DataFusion for Bounded-Memory Compute
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Quiet
- Tech stack
- python
- Domain
- backend, data-engineering, databases
Research direction
No implementation files or tests are named. Start by reading related issues #1210, #3270, and #3554, then scope the proposed ReadBackend, WriteBackend, and ComputeBackend protocols and DataFusion integration. Done requires the listed delete, streaming, sort, and scan-planning behaviors, no regression without DataFusion, and equivalent PyArrow and DataFusion results.
Written by the indexing model from the issue text.
Description
Summary
PyIceberg uses PyArrow as its sole execution engine. PyArrow is a kernel library with no memory management, no spill-to-disk, and no join operators. Operations that process more data than available memory (CoW deletes, equality delete resolution, scan planning for heavily-deleted tables, sorted writes) crash with OOM errors.
This issue tracks introducing a pluggable backend interface (ReadBackend, WriteBackend, ComputeBackend protocols) and integrating Apache DataFusion as the first bounded-memory compute backend.
Problem
| Operation | Current Status | OOM Pattern |
|---|---|---|
| Equality delete reads | Hard ValueError |
Anti-join requires all delete keys in memory |
| CoW delete (large files) | OOMs | Materializes entire Parquet file into RAM |
| Scan planning (>100K deletes) | OOMs | All delete entries in Python dict |
| Sort-on-write | Not implemented | Full sort before write |
| Positional deletes (millions) | OOMs | Python set of positions |
Tables written by Flink (which uses equality deletes) are completely unreadable by PyIceberg today.
Solution
- Pluggable interface:
ReadBackend,WriteBackend,ComputeBackendprotocols that decouple PyIceberg from PyArrow - DataFusion integration: Bounded-memory sort, join, and filter with spill-to-disk via
datafusion-python - Migration: All existing data operations route through the interface with zero API changes
Deliverables
- Equality delete resolution (NEW): tables with equality deletes can now be read
- CoW delete/overwrite streaming (FIX): statistics short-circuit + two-pass streaming
- Positional delete resolution (IMPROVED): bounded-memory for large delete sets
- Sort-on-write (NEW): external merge sort when DataFusion installed
- Bounded-memory scan planning (NEW): for tables with >100K delete files
Related Issues
- #1210 - Support reading equality delete files
- #3270 - Equality Delete support
- #3554 - Integrate DataFusion as execution engine
Acceptance Criteria
- All existing tests pass without
datafusioninstalled (no regression) - Tables with equality deletes return correct results
- CoW delete on 2GB+ files completes without OOM (with DataFusion)
- Sort-on-write produces sorted files when table has sort order and DataFusion installed
- Property-based tests verify PyArrow and DataFusion backends produce identical output
- Dominant language
- Python
- Stars
- 1.1k
- Forks
- 589
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 72
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/iceberg-python
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
apache/iceberg-python#3996 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
apache/iceberg-python#3979 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
apache/iceberg-python#3885 ·
-
[Bug] PyArrowFileIO fails to propagate s3.ssl.ca-cert to pyarrow.fs.S3FileSystem tls_ca_file_path Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
apache/iceberg-python#3866 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
apache/iceberg-python#3836 · 1 comment ·
All issues in apache/iceberg-python
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
learningequality/ricecooker#747 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
BSData/horus-heresy-3rd-edition#3171 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
run-llama/llama_index#23199 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
KhronosGroup/glTF-Blender-IO#2769 ·