Skip to content

refactor: replace includeColumnIndexes list lookup with ColumnIndexResolver - #1015

Open
bengbengbalabalabeng wants to merge 8 commits into
apache:mainfrom
bengbengbalabalabeng:refactor-columns-filter-read
Open

refactor: replace includeColumnIndexes list lookup with ColumnIndexResolver#1015
bengbengbalabalabeng wants to merge 8 commits into
apache:mainfrom
bengbengbalabalabeng:refactor-columns-filter-read

Conversation

@bengbengbalabalabeng

@bengbengbalabalabeng bengbengbalabalabeng commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Purpose of the pull request

Related: #950

Replace duplicate List<Integer> includeColumnIndexes logic across read handlers with a strategy-based ColumnIndexResolver.

What's changed?

  • Removed ReadSheet#columnIndexes and added ReadSheet#columnIndexResolver.
  • Added ReadSheetHolder#determineTargetColumnIndex(columnIndex) method.
  • Added ColumnIndexResolver.PASS_THROUGH: Keep original column indices.
  • Added DefaultIncludedColumnIndexResolver: Rewrite target columns’ internal indexes to consecutive (0-based).
    • Replace the original List.indexOf() lookup with Map.get() to improve lookup efficiency and semantic clarity.

Checklist

  • I have read the Contributor Guide.
  • I have written the necessary doc or comment.
  • I have added the necessary unit tests and all cases have 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.

3 participants