[Feature] Support to compact manifest files in partition and bucket order
- Dominant language
- Java
- Stars
- 3.4k
- Forks
- 1.4k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 396
Description
### Search before asking
- [x] I searched in the [issues](https://github.com/apache/paimon/issues) and found nothing similar.
### Motivation
Currently, there is no order in manifest files. When there are multiple big queries, there maybe no filter or pushdown for manifest files, so all files should be loaded into memory, leading to an OOM error for the cluster.
### Solution
Maybe we could add a new manifest compaction procedure to rewrite manifest files in order. Iceberg has a `RewriteManifestsSparkAction` procedure [link](https://github.com/apache/iceberg/blob/main/spark/v4.0/spark/src/main/java/org/apache/iceberg/spark/actions/RewriteManifestsSparkAction.java), including a spark `repartitionAndSort` transformation. It can rewrite and sort all manifest files in partiton order, which may be benefit for future reading.
I've achieved a first simple version of impl but I'm wondering whether this feature is reasonable, so I raise this issue for further discussion.
### Anything else?
Do you think it make sense? @JingsongLi @leaves12138 If not, is there an alternative solution for this problem? Looking forwards to your reply.
### Are you willing to submit a PR?
- [x] I'm willing to submit a PR!
Contributor guide
No contributing guide indexed for this repository
Research direction
The issue names no Paimon files, tests, or entry points; start by locating the existing simple implementation mentioned in the discussion. Read Iceberg's RewriteManifestsSparkAction and clarify the intended procedure scope, ordering rules, and validation before defining completion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spark
- Domain
- data-engineering, distributed-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100