Skip to content

refine: refine manifest_evaluator to reject not explicitly #1462

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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
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

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
2 participants