Skip to content
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

fix guarantees in allways_true of PruningPredicate #8732

Merged
merged 4 commits into from
Jan 3, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions datafusion/core/src/physical_optimizer/pruning.rs
Original file line number Diff line number Diff line change
Expand Up @@ -295,9 +295,9 @@ impl PruningPredicate {
&self.predicate_expr
}

/// Returns true if this pruning predicate is "always true" (aka will not prune anything)
/// Returns true if this pruning predicate is "always true" and literal_guarantees is empty(aka will not prune anything)
pub fn allways_true(&self) -> bool {
is_always_true(&self.predicate_expr)
is_always_true(&self.predicate_expr) && self.literal_guarantees.is_empty()
}

pub(crate) fn required_columns(&self) -> &RequiredColumns {
Expand Down