Skip to content

feat: support RowRangeIndex for DataEvolutionBatchScan#255

Merged
lszskye merged 4 commits into
alibaba:mainfrom
lxy-9602:add-row-range-index
Apr 27, 2026
Merged

feat: support RowRangeIndex for DataEvolutionBatchScan#255
lszskye merged 4 commits into
alibaba:mainfrom
lxy-9602:add-row-range-index

Conversation

@lxy-9602
Copy link
Copy Markdown
Collaborator

Purpose

Support RowRangeIndex for DataEvolutionBatchScan.

Linked issue: #38

Tests

RowRangeIndexTest

API and Format

Documentation

Generative AI tooling

Partially Generated-by: Claude-4.6-Opus

@zjw1111 zjw1111 requested a review from Copilot April 27, 2026 10:17
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@lszskye lszskye merged commit f6562e6 into alibaba:main Apr 27, 2026
9 checks passed
@zjw1111 zjw1111 requested a review from Copilot April 27, 2026 15:20
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/paimon/common/utils/row_range_index.cpp
ASSERT_OK_AND_ASSIGN(auto index, RowRangeIndex::Create({Range(10, 20)}));
ASSERT_FALSE(index.Intersects(21, 30));
}

Copy link

Copilot AI Apr 27, 2026

Choose a reason for hiding this comment

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

There are no tests covering invalid query intervals (start > end). If you decide to make Intersects return false and IntersectedRanges return empty for that case, please add explicit tests to lock in the behavior (both for single-range and multi-range indexes).

Suggested change
TEST(RowRangeIndexTest, IntersectsInvalidIntervalSingleRangeReturnsFalse) {
ASSERT_OK_AND_ASSIGN(auto index, RowRangeIndex::Create({Range(10, 20)}));
ASSERT_FALSE(index.Intersects(20, 10));
}
TEST(RowRangeIndexTest, IntersectsInvalidIntervalMultipleRangesReturnsFalse) {
ASSERT_OK_AND_ASSIGN(auto index,
RowRangeIndex::Create({Range(0, 10), Range(20, 30), Range(40, 50)}));
ASSERT_FALSE(index.Intersects(30, 20));
}
TEST(RowRangeIndexTest, IntersectedRangesInvalidIntervalSingleRangeReturnsEmpty) {
ASSERT_OK_AND_ASSIGN(auto index, RowRangeIndex::Create({Range(10, 20)}));
ASSERT_TRUE(index.IntersectedRanges(20, 10).empty());
}
TEST(RowRangeIndexTest, IntersectedRangesInvalidIntervalMultipleRangesReturnsEmpty) {
ASSERT_OK_AND_ASSIGN(auto index,
RowRangeIndex::Create({Range(0, 10), Range(20, 30), Range(40, 50)}));
ASSERT_TRUE(index.IntersectedRanges(30, 20).empty());
}

Copilot uses AI. Check for mistakes.
Comment thread src/paimon/CMakeLists.txt
Comment thread src/paimon/common/utils/row_range_index.cpp
Comment thread src/paimon/common/utils/row_range_index.cpp
Comment thread src/paimon/common/utils/row_range_index.cpp
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