Skip to content

Core: Fix BinPackRewriteFilePlanner producing incorrect output file count with max-files-to-rewrite#15576

Merged
huaxingao merged 1 commit into
apache:mainfrom
hemanthboyina:rewrite_data_files_expected_files
Mar 17, 2026
Merged

Core: Fix BinPackRewriteFilePlanner producing incorrect output file count with max-files-to-rewrite#15576
huaxingao merged 1 commit into
apache:mainfrom
hemanthboyina:rewrite_data_files_expected_files

Conversation

@hemanthboyina

Copy link
Copy Markdown
Contributor

When max-files-to-rewrite truncates a file group to a subset of files, inputSplitSize and expectedOutputFiles were still computed from the full group's input size. This caused the sort/zorder rewrite strategy to create too many small output files, as numShufflePartitions was overestimated. This fix recomputes the input size from the actual truncated file list.

@github-actions github-actions Bot added the core label Mar 10, 2026
@hemanthboyina

Copy link
Copy Markdown
Contributor Author

Hi @huaxingao would you be able to merge ?

@huaxingao huaxingao merged commit 06f9a1d into apache:main Mar 17, 2026
34 checks passed
@huaxingao

Copy link
Copy Markdown
Contributor

Thanks @hemanthboyina for your PR!

manuzhang pushed a commit to manuzhang/iceberg that referenced this pull request Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants