feat(blob): support blob.split-by-file-size to weigh blob files in scan splitting#417
Open
SteNicholas wants to merge 1 commit into
Open
feat(blob): support blob.split-by-file-size to weigh blob files in scan splitting#417SteNicholas wants to merge 1 commit into
SteNicholas wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new read option to align paimon-cpp scan splitting behavior with Java Paimon for blob tables, so that descriptor-based reads can avoid over-weighting large .blob payload files during split planning.
Changes:
- Introduces public option
Options::BLOB_SPLIT_BY_FILE_SIZEandCoreOptions::BlobSplitByFileSize()with fallback derived fromblob-as-descriptor. - Wires the option into the data-evolution scan path by extending
DataEvolutionSplitGeneratorwith acount_blob_sizeflag and adjusting its weight function to treat.blobfiles specially. - Adds unit tests covering CoreOptions fallback/precedence and the resulting split packing behavior.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/paimon/core/table/source/table_scan.cpp | Passes CoreOptions::BlobSplitByFileSize() into the data-evolution split generator construction. |
| src/paimon/core/table/source/split_generator_test.cpp | Adds a focused test ensuring blob-weighting changes split packing as expected. |
| src/paimon/core/table/source/data_evolution_split_generator.h | Extends the constructor to accept count_blob_size and stores it. |
| src/paimon/core/table/source/data_evolution_split_generator.cpp | Updates split weight computation to optionally discount .blob file sizes. |
| src/paimon/core/core_options.h | Exposes CoreOptions::BlobSplitByFileSize() getter. |
| src/paimon/core/core_options.cpp | Parses blob-as-descriptor and blob.split-by-file-size, and implements derived fallback behavior. |
| src/paimon/core/core_options_test.cpp | Adds assertions for default/derived/override behavior of BlobSplitByFileSize(). |
| src/paimon/common/defs.cpp | Defines the new option key string constant. |
| include/paimon/defs.h | Documents the new public option constant. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…an splitting Introduce the 'blob.split-by-file-size' option (no default) to control whether blob file size counts in scan split weights. When unset it derives from the negation of 'blob-as-descriptor', so descriptor reads weigh a blob file only by the open file cost instead of letting huge blob files shatter the scan into tiny splits. DataEvolutionSplitGenerator gains a count_blob_size flag wired from CoreOptions::BlobSplitByFileSize() in the data-evolution scan path. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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
Linked issue: close #416
Align with
CoreOptions.BLOB_SPLIT_BY_FILE_SIZEin apache/paimon. This PR adds theblob.split-by-file-sizeoption (no default value) to control whether blob file size is considered as a factor when performing scan splitting. When unset,CoreOptions::BlobSplitByFileSize()derives the value from the negation ofblob-as-descriptor: content reads keep counting blob file sizes, while descriptor reads, which materialize only small descriptors instead of blob payloads, weigh a blob file only by the open file cost.DataEvolutionSplitGeneratorgains acount_blob_sizeflag wired from the option in the data-evolution scan path, so huge blob files no longer dominate split weights and shatter the scan into many tiny splits when their contents are not read.Tests
CoreOptionsTest.TestDefaultValue: the option defaults totruewhen neither it norblob-as-descriptoris set.CoreOptionsTest.TestFromMap: withblob-as-descriptor=trueand the option unset,CoreOptions::BlobSplitByFileSize()derivesfalse.CoreOptionsTest.TestFallback: an explicitblob.split-by-file-size=truewins over the default derived fromblob-as-descriptor=true.SplitGeneratorTest.TestDataEvolutionBlobSplitByFileSize: the same data/blob file layout packs into two splits when blob file sizes count in the weight, and into a single split when blob files weigh only the open file cost.API and Format
Adds the public option constant
Options::BLOB_SPLIT_BY_FILE_SIZEininclude/paimon/defs.hand the getterCoreOptions::BlobSplitByFileSize(). TheDataEvolutionSplitGeneratorconstructor gains acount_blob_sizeparameter (internal, undersrc/). No storage format or protocol change.Documentation
The option is documented in the
include/paimon/defs.hdoc comment, following the existing blob options.Generative AI tooling
Generated-by: Claude Code (Claude Fable 5)
🤖 Generated with Claude Code