Skip to content

fix(optimizer): preserve residual index predicates#368

Merged
KKould merged 1 commit into
mainfrom
fix/index-range-residual
Jun 30, 2026
Merged

fix(optimizer): preserve residual index predicates#368
KKould merged 1 commit into
mainfrom
fix/index-range-residual

Conversation

@KKould

@KKould KKould commented Jun 30, 2026

Copy link
Copy Markdown
Member

What problem does this PR solve?

Index predicate pushdown currently cannot distinguish predicates fully consumed by an index range from predicates that must still be evaluated as residual filters. This can keep redundant filters in plans or make composite-index range extraction less precise.

Issue link: N/A

What is changed and how it works?

  • Add detached index predicates that carry both the selected range and any remaining residual predicate.
  • Remove exact index filters after physical index scan selection, while preserving residual predicates when only part of the filter is covered by the index lookup.
  • Tighten nullable/null range handling and exclusive RocksDB index bounds.
  • Keep secondary indexes correct when UPDATE changes primary keys or indexed columns.
  • Refresh related SLT expectations, TPCC runner docs, and the README Discord invite.

Code changes

  • Has Rust code change
  • Has CI related scripts change

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Note for reviewer

Validation run:

  • make fmt
  • make test
  • make test-slt

@KKould KKould force-pushed the fix/index-range-residual branch from 8c022cd to 9427495 Compare June 30, 2026 01:01
@KKould KKould merged commit 449bbc0 into main Jun 30, 2026
7 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.

1 participant