Skip to content

HBASE-30150 Propagate filter hints through composite filters#8486

Open
shubham-roy wants to merge 1 commit into
apache:branch-2.5from
shubham-roy:HBASE-30150-branch-2.5
Open

HBASE-30150 Propagate filter hints through composite filters#8486
shubham-roy wants to merge 1 commit into
apache:branch-2.5from
shubham-roy:HBASE-30150-branch-2.5

Conversation

@shubham-roy

Copy link
Copy Markdown
Contributor

(cherry picked from commit e45818e)

Description:

Backport of HBASE-30150 to branch-2.5, cherry-picked from master (commit
e45818ee9ae, PR #8217).

Stacks on the HBASE-29974 branch-2.5 backport (#8464), which introduced the
Filter#getSkipHint() / Filter#getHintForRejectedRow() API this change
propagates through composite filters.

What this does

Composite/wrapping filters now delegate the seek-hint methods to their
sub-filters instead of silently dropping the hints:

  • FilterList (MUST_PASS_ALL / MUST_PASS_ONE), SkipFilter, and
    WhileMatchFilter delegate getHintForRejectedRow() and getSkipHint()
    and merge the results — maximal-step merge for AND, minimal-step (null if
    any sub-filter returns null) for OR, consistent with the existing
    getNextCellHint() behavior.
  • ColumnRangeFilter, ColumnPrefixFilter, and MultipleColumnPrefixFilter
    gain getSkipHint() implementations.

Backport notes

Clean cherry-pick — no adaptation was required. The composite-filter classes
are Cell-based on branch-2.5, so the diff is identical to master. Tests are
unchanged from master (JUnit 5).

Impact

No-op by default: the new hint methods default to null, so existing filters
and scans are unaffected. The optimization only engages for filters that
implement the hints.

Testing

  • TestFilterHintForRejectedRow and TestFilterListHintDelegation (new)
    cover forward/reversed scans, AND/OR merge semantics, edge cases, and
    data-correctness invariants.
  • Compiles against branch-2.5 (mvn -pl hbase-client,hbase-server -am -DskipTests package).

cc @virajjasani

…8217)

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

Signed-off-by: Viraj Jasani <vjasani@apache.org>
(cherry picked from commit e45818e)
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.

2 participants