Skip to content

Conversation

@github-actions
Copy link
Contributor

Cherry-picked from #59967

This commit optimizes the compaction for sparse wide tables with:

1. Column batch replacement interface:
- replace_column_data_range(): batch copy using memcpy for fixed-width
types
   - support_replace_column_data_range(): runtime type check

2. Iterator batch processing:
   - RowBatch: represents continuous rows from same segment
- unique_key_next_batch(): returns multiple batches instead of
row-by-row

3. Reader sparse optimization:
   - Pre-fill NULL for nullable columns
   - SIMD detection for all-NULL/all-non-NULL batches
   - Run-length processing for mixed NULL batches

4. Writer SIMD optimization:
   - Use simd::count_zero_num for fast NULL counting
   - Fast path for all-NULL and all-non-NULL cases

5. Add batch Put operation for RLE encoder:
   - Put(value, run_length): write same value multiple times efficiently
   - Fast path when already in repeated run mode
   - Reduces loop iterations from N to 1 for repeated values
@github-actions github-actions bot requested a review from yiguolei as a code owner January 27, 2026 03:46
@hello-stephen
Copy link
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@dataroaring dataroaring reopened this Jan 27, 2026
@hello-stephen
Copy link
Contributor

run buildall

@doris-robot
Copy link

BE UT Coverage Report

Increment line coverage 80.38% (295/367) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 52.73% (18915/35870)
Line Coverage 35.87% (175817/490170)
Region Coverage 32.50% (136079/418714)
Branch Coverage 33.36% (58983/176783)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants