Skip to content

feat(table): support partition predicate pruning in TableScan#167

Open
QuakeWang wants to merge 1 commit intoapache:mainfrom
QuakeWang:feat/partition-predicate
Open

feat(table): support partition predicate pruning in TableScan#167
QuakeWang wants to merge 1 commit intoapache:mainfrom
QuakeWang:feat/partition-predicate

Conversation

@QuakeWang
Copy link
Copy Markdown
Contributor

Purpose

Linked issue: close #155

Add ReadBuilder::with_filter(Predicate) and wire partition predicate evaluation into TableScan::plan_snapshot to prune manifest entries by partition values, using the split-then-evaluate approach aligned with Java Paimon's splitPartitionPredicatesAndDataPredicates.

Brief change log

  • Add Predicate enum, Datum, PredicateOperator, and PredicateBuilder with name-based field resolution and type validation
  • Add ReadBuilder::with_filter(Predicate) to accept user filters
  • Wire partition predicate evaluation into TableScan::plan_snapshot using split-then-evaluate: split at AND boundaries, remap partition-only conjuncts, evaluate against partition BinaryRow, with result caching
  • Error handling: BinaryRow decode failure → fail-open; eval_row error → fail-fast

Tests

API and Format

New public API additions:

  • Datum, PredicateOperator, Predicate, PredicateBuilder — public types in paimon::spec
  • field_idx_to_partition_idx() — public utility function
  • ReadBuilder::with_filter(Predicate) — new builder method

Documentation

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.

feat: Partition predicate evaluation in TableScan

1 participant