Skip to content

Conversation

@ZENOTME
Copy link
Contributor

@ZENOTME ZENOTME commented Jun 21, 2025

Which issue does this PR close?

Closes #1355

What changes are included in this PR?

As discuss in #1355 (comment) , this pr change to:

  • return unexpect error for not in ManifestFilterVisitor to avoid confusion
  • rename the new and comment to declare the invariant explicitly

Are these changes tested?

@ZENOTME ZENOTME force-pushed the manifest_eval branch 2 times, most recently from c587593 to a63cc2e Compare June 23, 2025 13:16
@ZENOTME
Copy link
Contributor Author

ZENOTME commented Jun 23, 2025

/// `ManifestEvaluator` is not support to evaluate predicate with `not` operator.
/// This function requires that caller pass the predicate has been rewritten. Otherwise,
/// it will return unexpected error when evaluating the predicate.
pub(crate) fn new_without_rewrite_not(partition_filter: BoundPredicate) -> Self {
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of renaming constructor, how about add a new builder function like following:

pub(crate) fn with_rewrite_not(self, rewrite: bool) {
...
}

Also we should add some tests to cover rewriting not

Copy link
Contributor

@liurenjie1024 liurenjie1024 left a comment

Choose a reason for hiding this comment

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

Thanks @ZENOTME for this pr, LGTM! Just one minor nit.

@liurenjie1024 liurenjie1024 merged commit 4f1289a into apache:main Jun 27, 2025
17 checks passed
@Fokko
Copy link
Contributor

Fokko commented Jul 2, 2025

Nice one @ZENOTME Thanks for working on this 🙌

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.

Partition file filtering logic is incorrect for logical not() function

3 participants