Skip to content

feat(python): add BETWEEN/NOT BETWEEN predicate support - #546

Merged
JingsongLi merged 3 commits into
apache:mainfrom
hechao-ustc:feature/python-predicate-between
Jul 20, 2026
Merged

feat(python): add BETWEEN/NOT BETWEEN predicate support#546
JingsongLi merged 3 commits into
apache:mainfrom
hechao-ustc:feature/python-predicate-between

Conversation

@hechao-ustc

Copy link
Copy Markdown
Contributor

Purpose

The Python dict-format predicate parser was missing BETWEEN and NOT BETWEEN operators, which are standard SQL comparison operators already supported in the C bindings (paimon_predicate_between / paimon_predicate_not_between) and the core PredicateBuilder. This PR adds them to close the gap.

Brief change log

  • Add between and notBetween match arms in leaf_to_predicate(), each requiring exactly 2 literals (low, high), delegating to PredicateBuilder::between / not_between
  • Add 5 unit tests covering successful conversion (int and string fields), wrong literal count rejection, and literal value
    verification

Tests

  • cargo check -p pypaimon_rust
  • cargo test -p pypaimon_rust -- predicate
  • cargo clippy --all-targets --workspace --features fulltext,vortex -- -D warnings

API and Format

Documentation

hechao added 3 commits July 19, 2026 18:33
The Python dict-format predicate parser now accepts "between" and
"notBetween" leaf operators. Each requires exactly two literals (low,
high) and delegates to the core PredicateBuilder. This fills the last
remaining gap vs the C bindings for comparison-style predicates.

@QuakeWang QuakeWang left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

+1

@JingsongLi
JingsongLi merged commit 6d1617f into apache:main Jul 20, 2026
12 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.

3 participants