Uh oh!
There was an error while loading. Please reload this page.
[Improvement](serialize) use streamvbyte_encode in DataTypeFixedLengthObject::serialize - #60526
Conversation
Thearas
commented
Feb 5, 2026
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
BiteTheDDDDt
commented
Feb 5, 2026
run buildall |
1 similar comment
BiteTheDDDDt
commented
Feb 5, 2026
run buildall |
There was a problem hiding this comment.
Pull request overview
This pull request introduces a new serialization format for DataTypeFixedLengthObject using streamvbyte encoding to improve efficiency for large data columns. The BE exec version is bumped from 8 to 10 to enable this new format. Additionally, AggregateFunctionCount and AggregateFunctionCountNotNullUnary are marked as trivial for potential optimization benefits.
Changes:
- Introduced streamvbyte-based serialization/deserialization for
DataTypeFixedLengthObjectwhen data exceeds 256 bytes, gated behind BE exec version 10 - Bumped
max_be_exec_versionfrom 8 to 10 with comprehensive documentation and warnings - Marked count aggregate functions as trivial, consistent with sum and avg functions
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| be/src/vec/data_types/data_type_fixed_length_object.cpp | Implements new streamvbyte-based serialization format for large data with version gating |
| be/src/agent/be_exec_version_manager.h | Defines new version constant and removes unused old version constants |
| be/src/agent/be_exec_version_manager.cpp | Updates max version to 10 with detailed documentation and compatibility warnings |
| be/src/vec/aggregate_functions/aggregate_function_count.h | Marks count aggregate functions as trivial for optimization |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Uh oh!
There was an error while loading. Please reload this page.
| memcpy(buf, origin_data, mem_size); | ||
| return buf + mem_size; | ||
| } else { | ||
| // Throw exception if mem_size is large than UINT32_MAX |
There was a problem hiding this comment.
The comment has a grammatical error: "large than" should be "larger than". Additionally, the comment is misleading because streamvbyte_encode will not throw an exception if mem_size is larger than UINT32_MAX; instead, cast_set will throw an exception during the conversion at line 61. Consider revising the comment to accurately reflect this behavior.
| //Throw exception if mem_size is large than UINT32_MAX | |
| //cast_set will throw an exception if mem_size exceeds UINT32_MAX during conversion |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
hello-stephen
commented
Feb 5, 2026
FE UT Coverage ReportIncrement line coverage `` 🎉 |
BiteTheDDDDt
commented
Feb 5, 2026
run buildall |
hello-stephen
commented
Feb 5, 2026
FE UT Coverage ReportIncrement line coverage `` 🎉 |
BiteTheDDDDt
commented
Feb 6, 2026
run buildall |
hello-stephen
commented
Feb 6, 2026
FE UT Coverage ReportIncrement line coverage `` 🎉 |
hello-stephen
commented
Feb 6, 2026
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
hello-stephen
commented
Feb 6, 2026
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
hello-stephen
commented
Feb 6, 2026
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
PR approved by at least one committer and no changes requested. |
PR approved by anyone and no changes requested. |
Uh oh!
There was an error while loading. Please reload this page.
…hObject::serialize (apache#60526) This pull request introduces a new serialization format for `DataTypeFixedLengthObject` columns, leveraging streamvbyte encoding for efficient storage and transmission of large data blocks. The new format is activated for BE exec version 10 and above, which is now set as the maximum supported version. Additionally, the `AggregateFunctionCount` and `AggregateFunctionCountNotNullUnary` functions are marked as trivial, likely for optimization purposes. Below are the most important changes: * Introduced a new serialization/deserialization format for `DataTypeFixedLengthObject` that uses streamvbyte encoding for large data, improving efficiency for big data columns. The new logic is gated behind BE exec version 10 and includes fallback to the previous format for older versions (`be/src/vec/data_types/data_type_fixed_length_object.cpp`). [[1]](diffhunk://#diff-7d29ab3e43d23db58f2216e23cc131705067e133fb7ab2da72f2e67c725beb48L36-L41) [[2]](diffhunk://#diff-7d29ab3e43d23db58f2216e23cc131705067e133fb7ab2da72f2e67c725beb48L56-R130) [[3]](diffhunk://#diff-7d29ab3e43d23db58f2216e23cc131705067e133fb7ab2da72f2e67c725beb48L84-R144) [[4]](diffhunk://#diff-7d29ab3e43d23db58f2216e23cc131705067e133fb7ab2da72f2e67c725beb48R156-R172) * Updated the calculation of uncompressed serialized bytes to account for the new serialization format and potential streamvbyte compression (`be/src/vec/data_types/data_type_fixed_length_object.cpp`). * Added the `streamvbyte` library include to support the new encoding/decoding logic (`be/src/vec/data_types/data_type_fixed_length_object.cpp`). * Increased `BeExecVersionManager::max_be_exec_version` from 8 to 10, with detailed documentation and warnings about the sensitivity of this field. The new version enables the updated serialization logic (`be/src/agent/be_exec_version_manager.cpp`). * Defined a new constant `USE_NEW_FIXED_OBJECT_SERIALIZATION_VERSION = 10` to clearly mark the threshold for the new serialization format (`be/src/agent/be_exec_version_manager.h`). * Marked `AggregateFunctionCount` and `AggregateFunctionCountNotNullUnary` as trivial by overriding the `is_trivial()` method to return `true`, which may allow for performance optimizations in the aggregation engine (`be/src/vec/aggregate_functions/aggregate_function_count.h`). [[1]](diffhunk://#diff-a5dbb09237f197bffdcbd3bec4fdd089913ec143d96806618c8eeb4c5dbb8cfeR64-R65) [[2]](diffhunk://#diff-a5dbb09237f197bffdcbd3bec4fdd089913ec143d96806618c8eeb4c5dbb8cfeR212-R213)
…hObject::serialize (apache#60526) This pull request introduces a new serialization format for `DataTypeFixedLengthObject` columns, leveraging streamvbyte encoding for efficient storage and transmission of large data blocks. The new format is activated for BE exec version 10 and above, which is now set as the maximum supported version. Additionally, the `AggregateFunctionCount` and `AggregateFunctionCountNotNullUnary` functions are marked as trivial, likely for optimization purposes. Below are the most important changes: * Introduced a new serialization/deserialization format for `DataTypeFixedLengthObject` that uses streamvbyte encoding for large data, improving efficiency for big data columns. The new logic is gated behind BE exec version 10 and includes fallback to the previous format for older versions (`be/src/vec/data_types/data_type_fixed_length_object.cpp`). [[1]](diffhunk://#diff-7d29ab3e43d23db58f2216e23cc131705067e133fb7ab2da72f2e67c725beb48L36-L41) [[2]](diffhunk://#diff-7d29ab3e43d23db58f2216e23cc131705067e133fb7ab2da72f2e67c725beb48L56-R130) [[3]](diffhunk://#diff-7d29ab3e43d23db58f2216e23cc131705067e133fb7ab2da72f2e67c725beb48L84-R144) [[4]](diffhunk://#diff-7d29ab3e43d23db58f2216e23cc131705067e133fb7ab2da72f2e67c725beb48R156-R172) * Updated the calculation of uncompressed serialized bytes to account for the new serialization format and potential streamvbyte compression (`be/src/vec/data_types/data_type_fixed_length_object.cpp`). * Added the `streamvbyte` library include to support the new encoding/decoding logic (`be/src/vec/data_types/data_type_fixed_length_object.cpp`). * Increased `BeExecVersionManager::max_be_exec_version` from 8 to 10, with detailed documentation and warnings about the sensitivity of this field. The new version enables the updated serialization logic (`be/src/agent/be_exec_version_manager.cpp`). * Defined a new constant `USE_NEW_FIXED_OBJECT_SERIALIZATION_VERSION = 10` to clearly mark the threshold for the new serialization format (`be/src/agent/be_exec_version_manager.h`). * Marked `AggregateFunctionCount` and `AggregateFunctionCountNotNullUnary` as trivial by overriding the `is_trivial()` method to return `true`, which may allow for performance optimizations in the aggregation engine (`be/src/vec/aggregate_functions/aggregate_function_count.h`). [[1]](diffhunk://#diff-a5dbb09237f197bffdcbd3bec4fdd089913ec143d96806618c8eeb4c5dbb8cfeR64-R65) [[2]](diffhunk://#diff-a5dbb09237f197bffdcbd3bec4fdd089913ec143d96806618c8eeb4c5dbb8cfeR212-R213)
What problem does this PR solve?
This pull request introduces a new serialization format for
DataTypeFixedLengthObjectcolumns, leveraging streamvbyte encoding for efficient storage and transmission of large data blocks. The new format is activated for BE exec version 10 and above, which is now set as the maximum supported version. Additionally, theAggregateFunctionCountandAggregateFunctionCountNotNullUnaryfunctions are marked as trivial, likely for optimization purposes. Below are the most important changes:Serialization and Deserialization Improvements
DataTypeFixedLengthObjectthat uses streamvbyte encoding for large data, improving efficiency for big data columns. The new logic is gated behind BE exec version 10 and includes fallback to the previous format for older versions (be/src/vec/data_types/data_type_fixed_length_object.cpp). [1][2][3][4]be/src/vec/data_types/data_type_fixed_length_object.cpp).streamvbytelibrary include to support the new encoding/decoding logic (be/src/vec/data_types/data_type_fixed_length_object.cpp).Version Management
BeExecVersionManager::max_be_exec_versionfrom 8 to 10, with detailed documentation and warnings about the sensitivity of this field. The new version enables the updated serialization logic (be/src/agent/be_exec_version_manager.cpp).USE_NEW_FIXED_OBJECT_SERIALIZATION_VERSION = 10to clearly mark the threshold for the new serialization format (be/src/agent/be_exec_version_manager.h).Aggregate Function Optimization
AggregateFunctionCountandAggregateFunctionCountNotNullUnaryas trivial by overriding theis_trivial()method to returntrue, which may allow for performance optimizations in the aggregation engine (be/src/vec/aggregate_functions/aggregate_function_count.h). [1][2]Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)