feat(c): expose string and range predicates through the C binding#523
Merged
JingsongLi merged 6 commits intoJul 15, 2026
Merged
Conversation
…ase-sensitive variants Add compile-time signature assertions for the six new base predicate symbols (starts_with/ends_with/contains/like/between/not_between), matching the existing convention that pins every C-linked predicate symbol so an accidental signature change fails to compile rather than silently breaking header consumers. Add a smoke test exercising the six _with_case_sensitive variants so all new FFI entry points are touched. Also widen the datum-array helper comment to cover BETWEEN/NOT BETWEEN.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
The C binding (
bindings/c) exposed only comparison, null, and IN/NOT IN predicates. String-pattern and range operators — already implemented in the corePredicateBuilder— were unreachable from C, so C consumers (e.g. engine integrations) could not push those filters down.Brief change log
starts_with/ends_with/contains/like/between/not_between, each with a default (case-sensitive) and a_with_case_sensitivevariant.build_leaf_predicate_datum/build_leaf_predicate_datumshelpers;likemaps its escape byte via a smallescape_char_from_chelper (0→ core default\) and passes it through a closure, so no error-handling path is duplicated. Non-\escapes are rejected by core.Tests
cargo test -p paimon-c— added unit tests covering the happy path, a rejected non-\escape, a non-string datum error, thelow > highshort-circuit, and a smoke test touching every_with_case_sensitivevariant.API and Format
Documentation