Skip to content

Conversation

@SteNicholas
Copy link
Contributor

@SteNicholas SteNicholas commented Feb 10, 2026

Purpose

Linked issue: close #110

Support LeafFunction of predicates including StartsWith, EndsWith, Contains, Like.

Tests

  • PredicateTest, TestStartsWith
  • PredicateTest, TestStartsWithNull
  • PredicateTest, TestEndsWith
  • PredicateTest, TestEndsWithNull
  • PredicateTest, TestContains
  • PredicateTest, TestContainshNull
  • PredicateTest, TestLike
  • PredicateConverterTest, TestSimple
  • PredicatePushdownTest, TestStringData

API and Format

No.

Documentation

No.

Copilot AI review requested due to automatic review settings February 10, 2026 03:34
@SteNicholas SteNicholas marked this pull request as draft February 10, 2026 03:34
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds support for string pattern-matching leaf predicates (StartsWith, EndsWith, Contains, Like) so they can be evaluated as LeafFunctions and (for Parquet) converted into Arrow compute expressions.

Changes:

  • Introduces new Function::Type variants and corresponding leaf-function implementations for string predicates.
  • Extends Parquet PredicateConverter to convert these new leaf predicates into Arrow compute expressions.
  • Updates predicate negation to allow “non-negatable” leaf functions (via nullable Negate()), and expands unit tests accordingly.

Reviewed changes

Copilot reviewed 34 out of 34 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
src/paimon/format/parquet/predicate_converter_test.cpp Adds Parquet conversion assertions for the new string leaf predicates.
src/paimon/format/parquet/predicate_converter.cpp Adds Arrow compute conversion cases for STARTS_WITH / ENDS_WITH / CONTAINS / LIKE.
src/paimon/common/predicate/string_leaf_binary_function.h Introduces a shared base for string binary leaf functions.
src/paimon/common/predicate/starts_with.h Implements StartsWith leaf-function logic for string values (and stats filtering attempt).
src/paimon/common/predicate/ends_with.h Implements EndsWith leaf-function logic for string values.
src/paimon/common/predicate/contains.h Implements Contains leaf-function logic for string values.
src/paimon/common/predicate/like.h Implements Like leaf-function logic for SQL-like patterns.
src/paimon/common/predicate/predicate_utils.h Extends visitor dispatch to support the new leaf predicate function types.
src/paimon/common/predicate/predicate_test.cpp Renames bigint row helper, adds string row helper, and adds tests for new string predicates.
src/paimon/common/predicate/predicate_builder.cpp Wires new builder helpers and includes for string predicates.
src/paimon/common/predicate/not_in.h Updates Negate() signature to pointer-returning form.
src/paimon/common/predicate/not_in.cpp Updates Negate() implementation to return pointer.
src/paimon/common/predicate/not_equal.h Updates Negate() signature to pointer-returning form.
src/paimon/common/predicate/not_equal.cpp Updates Negate() implementation to return pointer.
src/paimon/common/predicate/less_than.h Updates Negate() signature to pointer-returning form.
src/paimon/common/predicate/less_than.cpp Updates Negate() implementation to return pointer.
src/paimon/common/predicate/less_or_equal.h Updates Negate() signature to pointer-returning form.
src/paimon/common/predicate/less_or_equal.cpp Updates Negate() implementation to return pointer.
src/paimon/common/predicate/leaf_predicate.cpp Makes predicate negation return nullptr when unsupported by leaf function.
src/paimon/common/predicate/leaf_function.h Changes LeafFunction::Negate() to return const LeafFunction* (nullable).
src/paimon/common/predicate/is_null.h Updates Negate() signature to pointer-returning form.
src/paimon/common/predicate/is_null.cpp Updates Negate() implementation to return pointer.
src/paimon/common/predicate/is_not_null.h Updates Negate() signature to pointer-returning form.
src/paimon/common/predicate/is_not_null.cpp Updates Negate() implementation to return pointer.
src/paimon/common/predicate/in.h Updates Negate() signature to pointer-returning form.
src/paimon/common/predicate/in.cpp Updates Negate() implementation to return pointer.
src/paimon/common/predicate/greater_than.h Updates Negate() signature to pointer-returning form.
src/paimon/common/predicate/greater_than.cpp Updates Negate() implementation to return pointer.
src/paimon/common/predicate/greater_or_equal.h Updates Negate() signature to pointer-returning form.
src/paimon/common/predicate/greater_or_equal.cpp Updates Negate() implementation to return pointer.
src/paimon/common/predicate/equal.h Updates Negate() signature to pointer-returning form.
src/paimon/common/predicate/equal.cpp Updates Negate() implementation to return pointer.
include/paimon/predicate/predicate_builder.h Adds public builder APIs for StartsWith/EndsWith/Contains/Like.
include/paimon/predicate/function.h Extends function type enum with STARTS_WITH / ENDS_WITH / CONTAINS / LIKE.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@SteNicholas SteNicholas force-pushed the PAIMON-110 branch 8 times, most recently from 052fd68 to 5443224 Compare February 10, 2026 08:41
@SteNicholas SteNicholas marked this pull request as ready for review February 10, 2026 09:15
@SteNicholas
Copy link
Contributor Author

Ping @lxy-9602.

@SteNicholas SteNicholas force-pushed the PAIMON-110 branch 5 times, most recently from 9b06d92 to 59d3a9f Compare February 11, 2026 08:17
@SteNicholas SteNicholas marked this pull request as draft February 11, 2026 08:37
@SteNicholas SteNicholas force-pushed the PAIMON-110 branch 9 times, most recently from e2dc329 to 746a03a Compare February 11, 2026 16:25
@SteNicholas SteNicholas requested a review from lxy-9602 February 11, 2026 17:10
@SteNicholas SteNicholas marked this pull request as ready for review February 11, 2026 17:10
@SteNicholas
Copy link
Contributor Author

Ping @lxy-9602, @lszskye, @lucasfang.

@SteNicholas SteNicholas force-pushed the PAIMON-110 branch 2 times, most recently from c743d76 to e82f13f Compare February 12, 2026 03:42
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.

[Feature] Support LeafFunction of Contains, Like, StartsWith, EndsWith

2 participants