Skip to content

feat: add Range, RangeHelper, RowRangeIndex, and ByteRangeCombiner ut…#19

Merged
JingsongLi merged 1 commit into
apache:mainfrom
dalingmeng:feat/add-range-utils
May 26, 2026
Merged

feat: add Range, RangeHelper, RowRangeIndex, and ByteRangeCombiner ut…#19
JingsongLi merged 1 commit into
apache:mainfrom
dalingmeng:feat/add-range-utils

Conversation

@dalingmeng
Copy link
Copy Markdown
Contributor

Purpose

No Linked issue.

Introduce range-related utility modules to the apache/paimon-cpp codebase. These modules provide range representation, range manipulation helpers, row range indexing with binary search, and byte range combining adapted from Apache ORC.

  • Introduce Range struct for inclusive integer range representation (include/paimon/utils/range.h, range.cpp)
  • Introduce RangeHelper template for range splitting and merging operations (range_helper.h)
  • Introduce RowRangeIndex for efficient intersection queries over sorted non-overlapping ranges using binary search (include/paimon/utils/row_range_index.h, row_range_index.cpp)
  • Introduce ByteRangeCombiner for combining byte ranges, adapted from Apache ORC (byte_range_combiner.h, byte_range_combiner.cpp)
  • Update LICENSE to add byte_range_combiner files under the Apache ORC attribution entry

Tests

  • range_test.cpp — Range construction, count, intersection, merge, and string representation
  • range_helper_test.cpp — RangeHelper split and merge operations
  • row_range_index_test.cpp — RowRangeIndex intersection queries and edge cases
  • byte_range_combiner_test.cpp — ByteRangeCombiner combining logic

API and Format

No API or format changes.

Documentation

No documentation changes.

Generative AI tooling

Copy link
Copy Markdown

@leaves12138 leaves12138 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update. I found one compile-blocking issue: depends on via , but that header is not present in this PR/head tree, so including cannot compile. Please either add the missing / definition in this PR, include the correct existing header, or move into a header that is actually part of the branch before using it here.

#include <vector>

#include "paimon/result.h"
#include "paimon/utils/read_ahead_cache.h"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This header is not present in the PR head tree ( / are both missing), but uses from it. As-is, this new header cannot compile. Please add the missing header/ definition, or include the correct existing header before using .

@dalingmeng dalingmeng force-pushed the feat/add-range-utils branch from f63163c to 8309253 Compare May 26, 2026 08:08
Copy link
Copy Markdown

@leaves12138 leaves12138 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update. The previous missing-header blocker is resolved after removing ByteRangeCombiner from this PR, and I did not find any remaining blocking issue in the updated range/row-range changes.

@JingsongLi JingsongLi merged commit 4407a5b into apache:main May 26, 2026
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.

3 participants