Skip to content

Conversation

@mergify
Copy link
Contributor

@mergify mergify bot commented Dec 28, 2025

Why I'm doing:

For the following predicate:
f0 = 44 and (case when f0 = 44 then f1 else f2) = 33,
Paimon cannot parse the predicate (case when f0 = 44 then f1 else f2) = 33, and the predicate conversion returns null.
Normally, the predicate f0 = 44 should be retained.

What I'm doing:

Fixes #issue

What type of PR is this:

  • BugFix
  • Feature
  • Enhancement
  • Refactor
  • UT
  • Doc
  • Tool

Does this PR entail a change in behavior?

  • Yes, this PR will result in a change in behavior.
  • No, this PR will not result in a change in behavior.

If yes, please specify the type of change:

  • Interface/UI changes: syntax, type conversion, expression evaluation, display information
  • Parameter changes: default values, similar parameters but with different default values
  • Policy changes: use new policy to replace old one, functionality automatically enabled
  • Feature removed
  • Miscellaneous: upgrade & downgrade compatibility, etc.

Checklist:

  • I have added test cases for my bug fix or my new feature
  • This pr needs user documentation (for new or modified features or behaviors)
    • I have added documentation for my new feature or new function
  • This is a backport pr

Bugfix cherry-pick branch check:

  • I have checked the version labels which the pr will be auto-backported to the target branch
    • 4.0
    • 3.5
    • 3.4
    • 3.3

Note

Improves Paimon predicate conversion robustness and partial-predicate preservation.

  • Add PaimonPredicateContext to track parent CompoundPredicateOperator
  • Update PaimonPredicateConverter to accept PaimonPredicateContext and propagate it to children
  • For AND, return the non-null predicate when one side is unconvertible; under parent NOT, return null to avoid invalid partials; keep NOT over LIKE unsupported
  • Update visitor method signatures to use the new context
  • Add testOrWithFunction validating mixed OR/AND/NOT with CASE WHEN and LIKE

Written by Cursor Bugbot for commit 5b92c31. This will update automatically on new commits. Configure here.


This is an automatic backport of pull request #66038 done by [Mergify](https://mergify.com).

@mergify
Copy link
Contributor Author

mergify bot commented Dec 28, 2025

🧪 CI Insights

Here's what we observed from your CI run for 982dfdd.

❌ Job Failures

Pipeline Job Health on branch-3.5 Retries 🔍 CI Insights 📄 Logs
CI PIPELINE - BRANCH FE UT Unknown 0 View View

auto-merge was automatically disabled December 28, 2025 17:46

Pull request was closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants