feat(commit): support dropping delete file stats - #190
Open
liujiayi771 wants to merge 2 commits into
Open
Conversation
liujiayi771
marked this pull request as ready for review
August 9, 2026 02:19
Contributor
Author
lxy-9602
reviewed
Aug 9, 2026
| /// @param default_num_bucket Bucket count used when a commit message omits it. | ||
| /// @param drop_delete_file_stats Whether DELETE data-file entries should omit value stats. | ||
| explicit ManifestEntryChanges(int32_t default_num_bucket, bool drop_delete_file_stats = false); | ||
|
|
Collaborator
There was a problem hiding this comment.
Could we avoid using a default argument here? In production code, it’s better to pass the parameter explicitly.
| // Paimon Java currently drops value stats during writer restore. This is a known bug: a | ||
| // restored file can become a compact-after ADD via metadata-only level upgrade and lose its | ||
| // stats (https://github.com/apache/paimon/issues/7026). C++ intentionally does not align with | ||
| // that behavior; stats are dropped later only when the final entry kind is DELETE. |
Collaborator
There was a problem hiding this comment.
Nice catch! Could you please add a PK compaction end-to-end test in pk_compaction_inte_test.cpp to demonstrate that level upgrades do not lose their stats?
lxy-9602
reviewed
Aug 9, 2026
|
|
||
| /// "manifest.delete-file-drop-stats" - Whether final DELETE manifest entries should omit | ||
| /// value statistics. Default is false. | ||
| static const char MANIFEST_DELETE_FILE_DROP_STATS[]; |
Collaborator
There was a problem hiding this comment.
Also, could you complete the comment here? I noticed that the Java version also includes: “Default value is false only for compatibility with old readers.”
Honor manifest.delete-file-drop-stats during commit scans and manifest entry creation while preserving statistics for ADD entries and writer restore. Co-Authored-By: Codex <noreply@openai.com> AI-Model: gpt-5 Co-Authored-By: Claude Code <noreply@anthropic.com>
Require callers to pass drop_delete_file_stats explicitly, document the old-reader compatibility default, and cover PK metadata-only level upgrades end to end. Co-Authored-By: Codex <noreply@openai.com> AI-Model: gpt-5
liujiayi771
force-pushed
the
feat/paimon-cpp-kmanifestdeletefiledrops
branch
from
August 9, 2026 12:54
e5ec8a0 to
b510b91
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
This is a follow-up to #187 and adds full support for
manifest.delete-file-drop-stats=truein the C++ commit path.value_statsandvalue_stats_colsfrom final DELETE manifest entries.Tests
cmake --build build --target paimon_static paimon_shared -j8cmake --build build --target paimon-core-test -j8./build/debug/paimon-core-test --gtest_brief=1(1629 tests passed)pre-commit run --files <changed files>git diff --check apache/main...HEADAPI and Format
Adds the public option key
kManifestDeleteFileDropStats.There is no manifest schema or protocol change. When enabled, DELETE entries store empty value statistics and an empty value-statistics column list, matching the existing Paimon format. ADD entries retain complete statistics for file skipping.
Documentation
This implements an existing Paimon table option. No documentation files are included in this PR.
Generative AI tooling
Generated-by: Codex (GPT-5) and Claude Code.