Skip to content

feat(scan): support create index readers with field name during scan process#26

Merged
lxy-9602 merged 3 commits intoalibaba:mainfrom
lszskye:adjust_row_range_scan
Dec 23, 2025
Merged

feat(scan): support create index readers with field name during scan process#26
lxy-9602 merged 3 commits intoalibaba:mainfrom
lszskye:adjust_row_range_scan

Conversation

@lszskye
Copy link
Collaborator

@lszskye lszskye commented Dec 22, 2025

feat(scan): support create index readers with field name during scan process

Purpose

Linked issue: #5

Tests

GlobalIndexTest

API and Format

virtual Result<std::vector<std::shared_ptr>> CreateReaders(const std::string& field_name) const = 0;

@lucasfang lucasfang requested a review from Copilot December 22, 2025 10:08
lucasfang
lucasfang previously approved these changes Dec 22, 2025
Copy link

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

This PR adds support for creating multiple index readers for a field by name during the scan process. The new API method CreateReaders(const std::string& field_name) complements the existing CreateReader method by returning all available index readers for a given field, regardless of index type.

Key Changes:

  • Added public API method CreateReaders(const std::string& field_name) to retrieve all index readers for a field
  • Refactored internal implementation to extract common logic into a private CreateReaders(const DataField&) method
  • Added comprehensive test validating the new API with multiple index types (bitmap and lumina)

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
include/paimon/global_index/row_range_global_index_scanner.h Added public virtual method CreateReaders(const std::string& field_name) with documentation
src/paimon/core/global_index/row_range_global_index_scanner_impl.h Added public override for CreateReaders(const std::string&) and private helper CreateReaders(const DataField&)
src/paimon/core/global_index/row_range_global_index_scanner_impl.cpp Implemented new public method and refactored existing CreateReaders(int32_t) to use common CreateReaders(const DataField&) helper
test/inte/global_index_test.cpp Added TestScanIndexWithTwoIndexes test case verifying the new API works with bitmap and lumina indexes, and returns empty vector for non-indexed fields

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

Copy link
Collaborator

@lxy-9602 lxy-9602 left a comment

Choose a reason for hiding this comment

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

+1

@lxy-9602 lxy-9602 merged commit 66a701e into alibaba:main Dec 23, 2025
6 checks passed
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